﻿

<!DOCTYPE html>
<head>
    <meta charset="utf-8">
    <title>Layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="~/lib/layui/css/layui.css" media="all">
    <link href="https://www.jq22.com/jquery/bootstrap-3.3.4.css" rel="stylesheet">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
    <script src="~/lib/layui/layui.js" charset="utf-8"></script>
    <script src="~/js/origion.js" charset="utf-8"></script>
    <script src="https://code.jquery.com/jquery-3.0.0.min.js"></script>
    <script src="https://www.jq22.com/jquery/1.11.1/jquery.min.js"></script>
    <script src="https://www.jq22.com/jquery/bootstrap-3.3.4.js"></script>
    @*<script src="~/js/places.js"></script>*@
    <script src="~/js/address.js"></script>
    <script src="~/js/coffee.js"></script>
    <script src="~/js/tee.js"></script>
    <script src="~/js/wjh.js"></script>
    <script src="~/js/wh.js"></script>
    <style>

    .layui-table-cell {
        height: auto;
        overflow: visible;
        text-overflow: inherit;
        white-space: normal;
        word-break:break-all;
    }
    .layui-table-cell {
        height: auto;
        overflow: visible;
        text-overflow: inherit;
        white-space: normal;
    }

        .layui-input-inline{


            width: 185px;
        }


        .layui-tab > .layui-tab-title> .layui-this{
                 border-bottom: 5px solid #ff7f00;

            }
        
        .xuexinlabel {

                width: 140px;

        }
    </style>
    <!-- 注意：如果你直接复制所有代码到本地，上述 JS 路径需要改成你本地的 -->
</head>
<body>
    <script>
        function getthejiaoyudataa(){
            $.ajax({
                url: "/Infos/Getthejiaoyuininfos" + '?Jbxxid=' + $("#jbxxid").val(),
                type: "get",
                async: false,
                success: function (datas) {
                    console.log(datas);
                    return datas;                    
                }
            })
        }
layui.use('table', function () {
    var table = layui.table;
    table.render({
        elem: '#afilestable',
        data: getthejiaoyudataa(),
        
        defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义，去除该参数即可
            title: '提示'
            , layEvent: 'LAYTABLE_TIPS'
            , icon: 'layui-icon-tips'
        }]
        , title: '体检报告浏览'
        , page: true
    });

})
    function getParam(paramName) {
        paramValue = "", isFound = !1;
        if (this.location.search.indexOf("?") == 0 && this.location.search.indexOf("=") > 1) {
            arrSource = unescape(this.location.search).substring(1, this.location.search.length).split("&"), i = 0;
            while (i < arrSource.length && !isFound) arrSource[i].indexOf("=") > 0 && arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase() && (paramValue = arrSource[i].split("=")[1], isFound = !0), i++
        }
        return paramValue == "" && (paramValue = null), paramValue
    }

    function GetDingDept() {
        var data = [];
        $.ajax({
            url: "/TreeData/GetDingDeptData",
            type: "post",
            async: false,
            success: function (resut) {
                data = resut;
            }
        });
        return data;
    }

$(function() { 
    var key = getParam("uuid");
    console.log(key);
    if (key != null){
        var jbxxid = "";
 
        var a = diaoshen(jbxxid=key);
        console.log(a);
        console.log(a.corn[0].name);
        $("#jbxxid").val(key);

        $("#name").val(a.corn[0].name);
        $("#sexbox").val(a.corn[0].sex);
        $("#age").val(a.corn[0].age);
        $("#birthdate").val(a.corn[0].birthAge);
        $("#bloodbox").val(a.corn[0].bloodtype);
   
        $("#phonenumber").val(a.corn[0].phonenumber);
        $("#idNumber").val(a.corn[0].idNumber);
        $("#hjszplace").val(a.corn[0].hjszplace);
        $("#actuallyplace").val(a.corn[0].actuallyplace);

        $("#zhengzhimianmao").val(a.corn[0].zzmm);
        $("#dateOfJointhePartydate").val(a.corn[0].dateOfJointheParty);

        if (a.gangwei.length != 0) {
            $("#worknumber").val(a.gangwei[0].worknumber);

            $("#demo100").val(a.gangwei[0].department);
            $("#demo200").val(a.gangwei[0].dingdepartment);
            $("#gangwei").val(a.gangwei[0].gangwei);
            $("#cengji").val(a.gangwei[0].cengji);
            $("#zhiji").val(a.gangwei[0].zhiji);
            $("#datestartwork").val(a.gangwei[0].workstarttime);            
            var workday = a.gangwei[0].workstarttime;     
           
            var workdayTime = new Date(workday).getTime(); 
           
            var nowTime = new Date().getTime(); 
            //一年毫秒数(365 * 86400000 = 31536000000)
            console.log("161616616");
            console.log(Math.ceil((nowTime-workdayTime)/31536000000));
            $("#workage").val(Math.ceil((nowTime-workdayTime)/31536000000)-1);
        }
        if (a.hunyin.length != 0) {
            $("#hyzk").val(a.hunyin[0].hyzk);
            $("#shengyu").val(a.hunyin[0].shengyu);
            $("#kidsnumber").val(a.hunyin[0].kidsnumber);
        }
        if (a.situ.length != 0){
            $("#reasonofNotGood").val(a.situ[0].reasonofNotGood);
            $("input[name='situation'][value='"+a.situ[0].situation+"']").prop("checked",true);
            if (a.situ[0].situation == '不合格'){
                $("#notpassstatus").show();
                $("#uptjbg").hide();
                $("#hegeyesorno").hide();
            }
        }
        
    }
    var nations = ["汉族", "蒙古族", "回族", "藏族", "维吾尔族", "苗族", "彝族", "壮族", "布依族", "朝鲜族", "满族", "侗族", "瑶族", "白族",
		"土家族", "哈尼族", "哈萨克族", "傣族", "黎族", "傈僳族", "佤族", "畲族", "高山族", "拉祜族", "水族", "东乡族", "纳西族", "景颇族", "柯尔克孜族", "土族", 
		"达斡尔族", "仫佬族", "羌族", "布朗族", "撒拉族", "毛南族", "仡佬族", "锡伯族", "阿昌族", "普米族", "塔吉克族", "怒族", "乌孜别克族", "俄罗斯族", "鄂温克族", 
		"德昂族", "保安族", "裕固族", "京族", "塔塔尔族", "独龙族", "鄂伦春族", "赫哲族", "门巴族", "珞巴族", "基诺族"];


    var shens =  gettheSheng();
    console.log(shens);

    var option = "";
    var shenoption = "";
    var hjshenoption = "";

    for(var i = 0; i <
	    shens.length; i++) {
        //shenoption += '<option value="' + shens[i]["f_FullName"] + '">' + shens[i]["f_FullName"] + '</option>';
	    shenoption += '<option value="' + shens[i]["f_Id"] + '">' + shens[i]["f_FullName"] + '</option>';
    }
    for(var i = 0; i <
	    nations.length; i++) {
	    option += '<option value="' +  nations[i] + '">' + nations[i] + '</option>';
    }
    $(shenoption).appendTo("#sheng");
    $(option).appendTo("#nation");
    $(shenoption).appendTo("#hjsheng");
    $(shenoption).appendTo("#xjsheng");
    if (key != null){

       $("#sheng").val(a.corn[0].sheng); 
    }
    var _shioption = "";

    if (key != null){
        var _shi = gettheShi(a.corn[0].sheng);   
    
        for(var i = 0; i <
	    _shi.length; i++) {


	    _shioption += '<option value="' + _shi[i]["f_Id"] + '">' + _shi[i]["f_FullName"] + '</option>';
    }
        $(_shioption).appendTo("#shi");
    var _hjshioption = "";
    var _hjxianoption = "";
    var _xjshioption = "";
    var _xjxianoption = "";
    var _hjshilis = gettheShithree(a.corn[0].hjsheng);   
    var _xjshilis = gettheShithree(a.corn[0].xjsheng);

    for(var i = 0; i <
	    _hjshilis.length; i++) {
	    _hjshioption += '<option value="' + _hjshilis[i]["f_Id"] + '">' + _hjshilis[i]["f_FullName"] + '</option>';
    }
    $(_hjshioption).appendTo("#hjshi");//户籍市区
    for(var i = 0; i <
	    _xjshilis.length; i++){
        _xjshioption += '<option value="' + _xjshilis[i]["f_Id"] + '">' + _xjshilis[i]["f_FullName"] + '</option>';
        }
    $(_xjshioption).appendTo("#xjshi");
   
    var _hjxianlist = gettheShithree(a.corn[0].hjshi);  
    var _xjxianlist = gettheShithree(a.corn[0].xjshi);  


    for(var i = 0; i <
	    _hjxianlist.length; i++) {


	    _hjxianoption += '<option value="' + _hjxianlist[i]["f_Id"] + '">' + _hjxianlist[i]["f_FullName"] + '</option>';
    }
    for(var i = 0; i <
	    _xjxianlist.length; i++) {
	    _xjxianoption += '<option value="' + _xjxianlist[i]["f_Id"] + '">' + _xjxianlist[i]["f_FullName"] + '</option>';
    }
    $(_hjxianoption).appendTo("#hjxian");
    $(_xjxianoption).appendTo("#xjxian");
    $("#shi").val(a.corn[0].shi);
    $("#hjsheng").val(a.corn[0].hjsheng);
    $("#hjshi").val(a.corn[0].hjshi);
    $("#hjxian").val(a.corn[0].hjxian);
    $("#xjsheng").val(a.corn[0].xjsheng);
    $("#xjshi").val(a.corn[0].xjshi);
    $("#xjxian").val(a.corn[0].xjxian);
    $("#nation").val(a.corn[0].areas);
    }
});
      function testfunc() {
      console.log(16);   
      }
      function gettheshit(){
          console.log("lookthshit");
          console.log($("#jbxxid").val() == '');
          console.log($("#jbxxid").val());
          console.log($("#jbxxid").val() === '');
          console.log($.isEmptyObject($("#jbxxid").val()));

          var expreess = $("#jbxxid").val() === ''? '':'?Jbxxid='+$("#jbxxid").val();
          console.log(expreess);
          return "/infos/GetjibinginfosbyList"+expreess;
          //return "/infos/GetjibinginfosbyList?Jbxxid="+$("#jbxxid").val();
      }


      function gettheshiteducation(){

          var expreess = $("#jbxxid").val() === ''? '':'?Jbxxid='+$("#jbxxid").val();

           //'/infos/GeteducationsInfosbyList?Jbxxid='+$("#jbxxid").val()
          return "/infos/GeteducationsInfosbyList" +expreess;
      }

      function gettheshitjob(){

          var expreess = $("#jbxxid").val() === ''? '':'?Jbxxid='+$("#jbxxid").val();

          return "/infos/GetJobinfosbyList"+expreess;
          //url:'/infos/GetJobinfosbyList?Jbxxid='+$("#jbxxid").val()

      }
      function gettheshitfamily(){


          var expreess = $("#jbxxid").val() === ''? '':'?Jbxxid='+$("#jbxxid").val();
          return "/infos/GetfamilysinfosbyList"+expreess
      }

      function gettheshitjiangcheng(){
          var expreess = $("#jbxxid").val() === ''? '':'?Jbxxid='+$("#jbxxid").val();
       
          return "/infos/GetejiangchengInfosbyList"+ expreess 
      }

      function taketheUUid(){
          console.log($('#uuid').val());
      }

      function deletetherecords(id){
          $.ajax({
              url: "/Infos/deletetherecords",
              type: "post",
              async: false,
              data: {

                  _id:id
              },
              success: function(datas) {
                  layui.use('layer', function() {
                      layer = layui.layer;
                      layer.msg('该条数据完成删除', { icon: 1 }
                      );
                  });

              }
          }
          );
      }
      function deletetheworkinfos(id){
          $.ajax({
              url: "/Infos/deletetheworkins",
              type: "post",
              async: false,
              data: {

                  _id:id
              },
              success: function(datas) {
                  layui.use('layer', function() {
                      layer = layui.layer;
                      layer.msg('该条数据完成删除', { icon: 1 }
                      );
                  });

              }
          }
          );
      }

      function deletethefamilys(id){

          $.ajax({
              url: "/Infos/deletefamilys",
              type: "post",
              async: false,
              data: {

                  _id:id
              },
              success: function(datas) {
                  layui.use('layer', function() {
                      layer = layui.layer;
                      layer.msg('该条数据完成删除', { icon: 1 }
                      );
                  });

              }
          }
          );
      }
      function deletetheEducation(id){

          $.ajax({
              url: "/Infos/deleteEducation",
              type: "post",
              async: false,
              data: {

                  _id:id
              },
              success: function(datas) {
                  layui.use('layer', function() {
                      layer = layui.layer;
                      layer.msg('该条数据完成删除', { icon: 1 }
                      );
                  });

              }
          }
          );
      }
      function deletetheDisease(id){
          $.ajax({
              url: "/Infos/deleteDisease",
              type: "post",
              async: false,
              data: {

                  _id:id
              },
              success: function(datas) {

                  layui.use('layer', function() {
                      layer = layui.layer;
                      layer.msg('该数据完成提交', { icon: 1 }
                      );
                  });

              }
          }
          );
      }
      var globalparams = "";
      layui.use(['jquery', 'form'], function() {
              var form = layui.form;
              var $ =layui.jquery;
              var sel1Index = 0;
              form.on('select(selctOnchange)', function (data) {
                  console.log("好啦");
              });
      })
    </script>
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 3px;">
        <legend>花名册</legend>
    </fieldset>

    <div class="layui-tab">
        <ul class="layui-tab-title">
            <li class="layui-this">基本信息 </li>
            <li>招录信息 </li>
            <li>劳动关系</li>
            <li>培训发展</li>
            <li>人才评估</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <div class="layui-collapse" lay-accordion="">
                    <div class="layui-colla-item">
                        <h2 class="layui-colla-title">个人信息</h2>
                        <div class="layui-colla-content layui-show">

                            <div class="layui-collapse" lay-accordion="">
                                <div class="layui-colla-item">
                                    <h2 class="layui-colla-title">基本信息</h2>
                                    <div class="layui-colla-content layui-show">

                                        <!--1、员工基本信息-->


                                        <div class="layui-tab-item layui-show">
                                            <form class="layui-form layui-form-pane" action="" id="formBasicInfo" lay-filter="formBasicInfo" >

                                                @*form.val("formBasicInfo")*@
                                                <!--姓名-->


                                                <input type="hidden" name="jbxxid" id="jbxxid"/>
                                                <div class="layui-form-item">
                                                    <div class="layui-inline">
                                                    <label class="layui-form-label">姓名：</label>
                                                    <div class="layui-input-inline">
                                                        <input type="tel" name="name" id="name" autocomplete="off" class="layui-input" value="123" >
                                                    </div>
                                                    </div>
                                                <!--性别-->
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">性别：</label>
                                                    <div class="layui-input-inline">
                                                        <select name="sex"  lay-search="" id="sexbox">
                                                            <option value="">选择性别</option>
                                                            <option value="男">男</option>
                                                            <option value="女">女</option>
                                                        </select>
                                                    </div>
                                                </div>

                                                <!--年龄-->
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">年龄：</label>
                                                    <div class="layui-input-inline">
                                                        <input type="number" name="age"  id="age" autocomplete="off" class="layui-input">
                                                    </div>
                                                </div>
                                                </div>
                                                <!--出生日期-->
                                                 <div class="layui-form-item">
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">出生日期：</label>
                                                       <div class="layui-input-inline">
                                                        <input type="text" name="birthAge" id="birthdate" 
                                                            lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input" >
                                                    </div>
                                                </div>
                                                <!--血型-->
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">血型：</label>
                                                    <div class="layui-input-inline">
                                                        <select name="bloodtype" lay-verify="required" lay-search="" id="bloodbox" >
                                                            <option value="">选择血型</option>
                                                            <option value="A型">A型</option>
                                                            <option value="B型">B型</option>
                                                            <option value="AB型">AB型</option>
                                                            <option value="O型">O型</option>
                                                            <option value="RH阳型">RH阳型</option>
                                                            <option value="RH阴型">RH阴型</option>
                                                            <option value="未查">未查</option>
                                                        </select>
                                                    </div>
                                                </div>
                                                <!--民族-->
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">民族：</label>
                                                    <div class="layui-input-inline">
                                                        <select id="nation" name="areas" lay-verify="required" lay-search="" >
                                                            <option value="">选择民族</option>
                                                        </select>
                                                    </div>
                                                </div>
                                                </div>
                                                <!--手机号-->
                                                 <div class="layui-form-item">
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">手机号：</label>
                                                    <div class="layui-input-inline">
                                                        <input type="tel" id="phonenumber" name="phonenumber"  autocomplete="off" class="layui-input" value="">
                                                    </div>
                                                </div>


                                                <!--身份证号码-->
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">身份证号码</label>
                                                    <div class="layui-input-inline">
                                                        <input type="text" id="idNumber" name="idNumber" lay-verify="required|identity" 
                                                        placeholder="请输入身份证号码"  autocomplete="off" class="layui-input" value="" >
                                                    </div>
                                                
                                                </div>

                                                <div class="layui-inline">


                                                        <p id="idnumbermention" style="color:blue; display: none">该身份证存在啦~~~~！！</p>

                                                </div>

                                                </div>

                                                <!--籍贯-->
                                       
                                                                                                                             
                                            <div class="layui-form-item">
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">籍贯：</label>
                                                    <div class="layui-input-inline">
                                                        <select id = "sheng" name="sheng" lay-verify="required" lay-search="" lay-filter="chosethesheng">
                                                            <option value="">选择省（市）</option>
                                                        </select>
                                                    </div>
                                                </div>

                                                <div class="layui-inline">
                                                    <label class="layui-form-label">市区(县)：</label>
                                                    <div class="layui-input-inline">
                                                        <select id="shi" name="shi" lay-verify="required" lay-search="" lay-filter="chosethexian">
                                                            <option value="">选择市区</option>
                                                        </select>
                                                    </div>
                                                </div>
                                   
                                            </div>
                                                <!--户籍所在地 -->


                                                <div class="layui-form-item">

                                                <div class="layui-inline">
                                                    <label class="layui-form-label">户籍：</label>
                                                    <div class="layui-input-inline">
                                                        <select id = "hjsheng" name="hjsheng" lay-verify="required" lay-search="" lay-filter="hjchosethesheng">
                                                            <option value="">选择省（市）</option>
                                                        </select>
                                                    </div>
                                                </div>
                                                 <div class="layui-inline">
                                                    <label class="layui-form-label">市区：</label>
                                                    <div class="layui-input-inline">
                                                        <select id="hjshi" name="hjshi" lay-verify="required" lay-search="" lay-filter="hjchosethexian">
                                                            <option value="">选择市区</option>
                                                        </select>
                                                    </div>
                                                </div> 
                                                 <div class="layui-inline">
                                                    <label class="layui-form-label">县：</label>
                                                    <div class="layui-input-inline">
                                                        <select id="hjxian" name="hjxian" lay-verify="required" lay-search="" lay-filter="">
                                                            <option value="">选择县</option>
                                                        </select>
                                                    </div>
                                                </div> 



                                                <div class="layui-form-item">
                                                    <label class="layui-form-label" style="width:130px;">户籍详细地址：</label>
                                                    <div class="layui-input-block" style="margin-left:130px;">
                                                        <input type="text" name="hjszplace" id="hjszplace" lay-verify="title" autocomplete="off" placeholder="请填写户籍所在地" class="layui-input" >
                                                         
                                                    </div>
                                                </div>                                                

                                                </div>


                                                <!--现居住地 -->
                                                <div class="layui-form-item">
                                                    <div class="layui-inline">
                                                    <label class="layui-form-label">现居地：</label>
                                                        <div class="layui-input-inline">
                                                            <select id = "xjsheng" name="xjsheng" lay-verify="required" lay-search="" lay-filter="xjchosethesheng">
                                                                <option value="">选择省（市）</option>
                                                            </select>
                                                        </div>
                                                    </div>
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">市区：</label>
                                                    <div class="layui-input-inline">
                                                        <select id="xjshi" name="xjshi" lay-verify="required" lay-search="" lay-filter="xjchosethexian">
                                                            <option value="">选择市区</option>
                                                        </select>
                                                    </div>
                                                </div>


                                                <div class="layui-inline">
                                                    <label class="layui-form-label">县：</label>
                                                    <div class="layui-input-inline">
                                                        <select id="xjxian" name="xjxian" lay-verify="required" lay-search="" lay-filter="xjchosethexian">
                                                            <option value="">选择市区</option>
                                                        </select>
                                                    </div>
                                                </div>



                                                </div>
                                                <div class="layui-form-item">
                                                    <label class="layui-form-label" style="width:150px;">现居地详细地址：</label>
                                                    <div class="layui-input-block" style="margin-left:150px;">
                                                        <input type="text" id="actuallyplace" name="actuallyplace" lay-verify="title" autocomplete="off" placeholder="请填写户籍所在地" class="layui-input"  value="@ViewBag.actuallyplace">
                                                    </div>
                                                </div>
                                                <!--政治面貌-->
                                            <div class="layui-form-item">
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">政治面貌：</label>
                                                    <div class="layui-input-inline">
                                                        <select name="zzmm" lay-verify="required" lay-search="" id="zhengzhimianmao">
                                                            <option value="">选择政治面貌</option>
                                                            <option value="中共党员">中共党员</option>
                                                            <option value="中共预备党员">中共预备党员</option>
                                                            <option value="民主党派">民主党派</option>
                                                            <option value="共青团员">共青团员</option>
                                                            <option value="群众">群众</option>
                                                            <option value="其他">其他</option>

                                                        </select>
                                                    </div>
                                                </div>

                                                <!--参加党派时间-->

                                                <div class="layui-inline">
                                                    <label class="layui-form-label" style="width: 130px">参加党派时间：</label>
                                                    <div class="layui-input-block" style="margin-left:130px;">
                                                        <input type="text" name="dateOfJointheParty" id="dateOfJointhePartydate" lay-verify="" placeholder="yyyy" autocomplete="off" class="layui-input" >
                                                    </div>
                                                </div>

                                            </div>
                                                <hr class="layui-border-green">
                                                <div class="layui-form-item btnsave" >
                                                    <div class="layui-input-block">
                                                    <input type="text" id="uuid" lay-verify="title" placeholder="" class="layui-input" style="display: none;">

                                                      <button type="button" class="layui-btn" lay-submit="" lay-filter="demo1" onclick="puttheInfosdata()" id="infosSave">保存</button>
                                                       
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-collapse" lay-accordion="">
                                <div class="layui-colla-item">
                                    <h2 class="layui-colla-title">岗位信息</h2>
                                    <div class="layui-colla-content">
                                        <!--2、岗位信息-->
                                        <div class="layui-tab-item layui-show">
                                            <form class="layui-form layui-form-pane" action="" id="formgangweiInfo">
                                                <!--工号-->
                                                <div class="layui-form-item">
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">工号：</label>
                                                    <div class="layui-input-inline">
                                                        <input type="tel" name="worknumber" id="worknumber"
                                                           autocomplete="off" class="layui-input" >
                                                    </div>
                                                </div>
                                                <!--部门-->
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">部门：</label>
                                                    <div class="layui-input-inline">

                                                        <input id="demo100" type="text" name="department" autocomplete="off" class="layui-input" />
                                                        @*<input id="demo100" onclick= "showOriDepartments()" />  *@

                                                    </div>
                                                </div>

                                                    <div class="layui-inline">
                                                        <label class="layui-form-label">流程部门：</label>
                                                        <div class="layui-input-inline">

                                                            <input id="demo200" type="text" name="dingdepartment" autocomplete="off" class="layui-input" value="@ViewBag.dingdepartment"/>


                                                        </div>
                                                    </div>
                                               </div>
                                               <div class="layui-form-item">

                                                <!--岗位-->

                                                <div class="layui-inline">
                                                    <label class="layui-form-label">岗位：</label>
                                                    <div class="layui-input-inline">
                                                        <input type="tel" name="gangwei" lay-verify="" autocomplete="off" class="layui-input" id="gangwei">
                                                    </div>
                                                </div>
                                                <!--层级-->

                                                <div class="layui-inline">
                                                    <label class="layui-form-label">层级：</label>
                                                    <div class="layui-input-inline">
                                                        <select name="cengji" lay-verify="required" lay-search="" id="cengji">
                                                            <option value="">直接选择层级</option>
                                                            <option value="1">高层</option>
                                                            <option value="2">中层</option>
                                                            <option value="3">基层</option>
                                                        </select>
                                                    </div>
                                                </div>
                                                <!--职级-->
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">职级：</label>
                                                    <div class="layui-input-inline">
                                                        <select name="zhiji" lay-verify="required" lay-search="" id="zhiji">
                                                            <option value="">直接选择职级</option>
                                                            <option value="1">总经理</option>
                                                            <option value="2">副总经理</option>
                                                            <option value="3">总经理助理</option>
                                                            <option value="4">部长</option>
                                                            <option value="5">副部长</option>
                                                            <option value="6">部长助理</option>
                                                            <option value="7">主任</option>
                                                            <option value="8">副主任</option>
                                                            <option value="12">初级主管</option>
                                                            <option value="9">一级主管</option>
                                                            <option value="10">二级主管</option>
                                                            <option value="11">专员</option>
                                                 
                                                        </select>
                                                    </div>
                                                </div>
                                                </div>
                                                <div class="layui-form-item">
                                                <!--入司日期-->
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">入司日期：</label>
                                                    <div class="layui-input-inline">
                                                        <input type="text" name="workstarttime" id="datestartwork" 
                                                            lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
                                                    </div>
                                                </div>
                                                <!--司龄-->
                                               <div class="layui-inline">
                                                    <label class="layui-form-label">司龄：</label>
                                                    <div class="layui-input-inline">
                                                        <input type="text" name="workage"  autocomplete="off" class="layui-input" id="workage">
                                                        <span style=" position: absolute; top: 1%; right: 6%;color: #adadad; display: table-cell;white-space: nowrap; padding: 7px 10px;">年</span>
                                                    </div>
                                               </div>   
                                               <script>
                                                    let chosetime = value.substr(0,10);
                                                    let chose = new Date(chosetime);
                                                    let nowtime = new Date(new Date());
                                                    var day = nowtime.getTime() - chose.getTime();
                                                    var key = parseInt(day/(1000*60*60*24));
                                                               
                                                    $('#workage').val(Math.floor(key / 365));
                                                                
                                                </script>
                                               </div>
                                               
                                                <hr class="layui-border-green">
                                                <div class="layui-form-item btnsave">
                                                    <div class="layui-input-block">
                                                        <button type="button" class="layui-btn" lay-submit="" lay-filter="demo1" onclick="putthegangweidata()" id="gangweisave">保存</button>
                                
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-collapse" lay-accordion="">
                                <div class="layui-colla-item">
                                    <h2 class="layui-colla-title">婚育状况</h2>
                                    <div class="layui-colla-content">
                                        <!--婚姻状况-->
                                        <div class="layui-tab-content">

                                            <div class="layui-tab-item layui-show">
                                                <form class="layui-form layui-form-pane" action="" id="formofShengyu" lay-filter="addthevalues">
                                                    <div class="layui-form-item">
                                                        <div class="layui-inline">
                                                            <label class="layui-form-label">婚姻状况：</label>
                                                            <div class="layui-input-inline">
                                                                <select name="hyzk" lay-verify="required" lay-search="" id="hyzk">
                                                                    <option value="">选择婚姻状况</option>
                                                                    <option value="0">未婚</option>
                                                                    <option value="1">已婚</option>
                                                                    <option value="2">再婚</option>
                                                                    <option value="3">离异</option>
                                                                    <option value="4">丧偶</option>
                                                                    <option value="5">其他</option>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <!--生育情况-->

                                                        <div class="layui-inline">
                                                            <label class="layui-form-label">生育情况：</label>
                                                            <div class="layui-input-inline">
                                                                <select name="shengyu" lay-verify="required" lay-search="" id="shengyu">
                                                                    <option value="">下拉选择</option>
                                                                    <option value="1">已育</option>
                                                                    <option value="0">未育</option>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <!--备注-->
                                                        <div class="layui-inline">
                                                            <label class="layui-form-label">子女数量：</label>
                                                            <div class="layui-input-inline">
                                                                <select name="kidsnumber" lay-verify="required" lay-search="" id="kidsnumber">
                                                                    <option value="">备注子女数量</option>
                                                                    <option value="1">一孩</option>
                                                                    <option value="2">二孩</option>
                                                                    <option value="3">三孩</option>
                                                                    <option value="4">四孩</option>
                                                                    <option value="0">其他</option>
                                                                </select>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <hr class="layui-border-green">
                                                    <div class="layui-form-item btnsave">
                                                        <div class="layui-input-block">
                                                            <button type="button" class="layui-btn" lay-submit="" lay-filter="demo1" onclick="puttheshengyuInfos()" id="kidssave">保存</button>
           
                                                        </div>
                                                    </div>
                                                </form>
                                            </div>
                                        </div>

                                    </div>
                                </div>
                            </div>
                            <div class="layui-collapse" lay-accordion="">
                                <div class="layui-colla-item">
                                    <h2 class="layui-colla-title">健康状况</h2>
                                    <!--健康状况-->
                                    <div class="layui-colla-content">
                                        <div class="layui-tab-item layui-show">
                                            <form class="layui-form layui-form-pane" action="" id="healthsituation">
                                                <!--原始记录-->
                                                <div class="layui-form-item">
                                                    <label class="layui-form-label">入职体检</label>
                                                    <div class="layui-input-block" id="IsPurchased">
                                                        <input type="radio" name="situation" value="合格" title="合格"  lay-filter="passornot" checked="checked">
                                                        <input type="radio" name="situation" value="不合格" title="不合格" lay-filter="passornot">
                                                    </div>
                                                </div>



                                                  <div class="layui-form-item" style="display: none;" id="notpassstatus">

                                                        <label class="layui-form-label" style="width:140px;">不合格情况说明:</label>
                                                
                                                       <div class="layui-input-block" style="margin-left:140px;">

                                                            <input type="text" name="reasonofNotGood" id="reasonofNotGood" lay-verify="" autocomplete="off" class="layui-input">
                                                        </div>
                                        
                                                  </div>

                                                  <div class="layui-upload" id="uptjbg">
                                                <button type="button" class="layui-btn layui-btn-sm" id="choicethefiles">选择《体检报告》</button>
                                                <button type="button" class="layui-btn layui-btn-sm" id="uploadthetijian">开始上传</button>
                                                @*<button type="button" class="layui-btn layui-btn-sm" id="checktijianFid" onclick="checktijianFi();">查看《体检报告》附件</button>*@
                                                <input name="CpFile" id="healthfile" hidden="hidden" />
                                                <div class="layui-upload-list" style="max-width: 1000px;display:none"  id="uploadupload">
                                                    <table class="layui-table">
                                                        <colgroup>
                                                            <col>
                                                            <col width="150">
                                                            <col width="260">
                                                            <col width="150">
                                                        </colgroup>
                                                        <thead>
                                                            <tr>
                                                                <th>文件名</th>
                                                                <th>大小</th>
                                                                <th>上传进度</th>
                                                                <th>操作</th>
                                                            </tr>
                                                        </thead>
                                                        <tbody id="demoListtijian"></tbody>
                                                    </table>
                                                </div>

                                            </div>  

                                                <div id="hegeyesorno">

                                                    <table class="layui-hide" id="filestable" lay-filter="filestable"></table>


                                                    <script type="text/html" id="prooffiles">
                                                        <a href="/publish/upload/{{  d.cpFile }}" class="layui-table-link" target="_blank">{{ d.cpFile }}</a></script>



                                                </div>

                                                <br/>
                                                <div class="layui-form-item btnsave">
                                                    <button type="button" class="layui-btn layui-btn-sm" onclick="getthesitudation()" id="healthSave">保存</button>
                                                </div>


                                                <hr class="layui-border-green">

                                                <hr class="layui-border-green">
                                            </form>

                                            <table class="layui-hide" id="testo" lay-filter="testo"></table>
 
                                            <script type="text/html" id="modifyAndDelete">
                                                <a class="layui-btn layui-btn-xs" lay-event="edit_oldht">修改</a>
                                                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del_oldht">删除</a>
                                            </script>
                                             
                                            <script type="text/html" id="deletethefiles">
                             
                                                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del_oldht">删除</a>
                                            </script>

                                            <script type="text/html" id="toolbarDemotest">
                                              <div class="layui-btn-container">
                                 
                                                <button class="layui-btn layui-btn-sm" lay-event="addthekranks">在职健康记录</button>
                                                <p></p>
                                              </div>
                                              <div style="color:#F00">

                                                  （备注：若有疾病史、对工作带来一定影响，需备注说明）

                                              </div>

                                            </script>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <script>
                        if (@Context.Session.GetString("rid") == 1||@Context.Session.GetString("rid")==4) {
                            $(".btnsave").hide();
                        }
                        </script>
                    </div>
                </div>


                            <form class="layui-form layui-form-pane" id="testtedalis" style="display:none">
                              <div class="layui-form-item">
                                <label class="layui-form-label">时间</label>
                                <div class="layui-input-inline">
                                  <input type="text" name="time" id = "shijian"  placeholder="请选择时间"  class="layui-input" >
                                </div>
                              </div>

          

                              <div class="layui-form-item">
                                <label class="layui-form-label">疾病史</label>
                                  <div class="layui-input-block">
                                      <textarea placeholder="请输入疾病史" class="layui-textarea" name="diseasehistory" id="diseasehistory"></textarea>
                                    </div>

                              </div>
                     
                              <div class="layui-form-item">
                                <label class="layui-form-label">康复状况</label>
                                  <div class="layui-input-block">
                                      <textarea placeholder="请输入康复状况" class="layui-textarea" name="diseasestatus" id="diseasestatus"></textarea>
                                    </div>

                              </div>


        

                            </form>

                             <form class="layui-form layui-form-pane" id="jiaoyutable" style="display:none">
                                <div class="layui-form-item">
                                <label class="layui-form-label">开始时间</label>
                                  <div class="layui-input-inline">
                               
                                  <input type="text" name="starttime" id = "jiaoyustart"  placeholder="请选择时间"  class="layui-input" >
                                </div>

                                </div>
                                <div class="layui-form-item">
                                <label class="layui-form-label">结束时间</label>
                                <div class="layui-input-inline">
                                  <input type="text" name="endtime" id = "jiaoyuend"  placeholder="请选择时间"  class="layui-input" >
                                </div>

                                </div>
                                <div class="layui-form-item">
                                <label class="layui-form-label">学校</label>
                                <div class="layui-input-inline">
                                  <input type="text" name="school"  placeholder="" autocomplete="on" class="layui-input" id="school">
                                </div>
                                </div>

                                <div class="layui-form-item">
                                <label class="layui-form-label">专业</label>
                                <div class="layui-input-inline">
                                  <input type="text" name="yuanxi"  placeholder="" autocomplete="on" class="layui-input" id="yaunxi">
                                </div>
                                </div>
                                <div class="layui-form-item">
                                <label class="layui-form-label">学习形式</label>
                                <div class="layui-input-inline">
                                  @*<input type="text" name="xuexixingshi"  placeholder="" autocomplete="on" class="layui-input">*@

                                    <select name="xuexixingshi" lay-verify="required" lay-search="" id="xuexixingshi" >
                                        <option value="">请选择学习形式</option>
                                        <option value="普通高等教育（全日制统招）">普通高等教育（全日制统招）</option>
                                        <option value="高等教育自学考试（自考）">高等教育自学考试（自考）</option>
                                        <option value="成人高等教育（脱产、业余、函授）">成人高等教育（脱产、业余、函授）</option>
                                        <option value="网络教育（远程教育）">网络教育（远程教育）</option>
                  
                                        
                                    </select>

                                </div>
                                </div>
                                <div class="layui-form-item">
                                <label class="layui-form-label">证书编号</label>
                                <div class="layui-input-inline">
                                  <input type="text" name="zhengshunumber"  placeholder="" autocomplete="on" class="layui-input" id="zhengshunumber">
                                </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">查验结果</label>

                                    <div class="layui-input-inline">
                                        <select name="xuexinresult" id="xuexinresult"  lay-filter="resultxiala">
                                            <option value="">---请选择---</option>
                                            <option value="已查实">已查实</option>
                                            <option value="未能查实">未能查实</option>                               
                                        </select>
                                    </div>

                                </div>


                                <div class="layui-form-item" style="display: none;" id="whynotpass">
                                <label class="layui-form-label" style="width: 140px;">未能查实原因说明</label>
@*

                                        <div class="layui-input-inline">
                                          <input type="text" name="xuexinresult"  placeholder="" autocomplete="on" class="layui-input">
                                        </div>*@

                                    <div class="layui-input-inline">
                                        <select   name="notpassresult" id="notpassresult"  lay-filter="xiala">
                                            <option value="">---请选择---</option>
                                            <option value="于2001年前获得的学历证书、学信网无法查验">于2001年前获得的学历证书、学信网无法查验</option>
                                            <option value="学历造假">学历造假</option>
                                            <option value="其他原因">其他原因</option>
       
                                        </select>
                                    </div>




                                </div>
                                <div class="layui-form-item layui-form-text" style="display: none;" id="xuexinbeizhu">
                                <label class="layui-form-label">备注</label>
                                <div class="layui-input-block">
                                    <textarea placeholder="请输入内容" class="layui-textarea" name="xuexinreason"></textarea>
                                </div>
                                </div>
                            
                                
                                <button type="button" class="layui-btn layui-btn-sm" id="xuexinupload"  style="display: none;" >上传《学信网查验结果》</button>
                                 <button type="button" class="layui-btn layui-btn-sm" id="uploadthexuexin" style="display: none;">开始上传《学信网查验结果》</button>
                                 <input name="fileUrl" id="fileUrl" hidden="hidden" />
                                <div class="layui-upload-list" style="max-width: 1000px; display: none;"  id="xuexidiv">

                           
                                    <table class="layui-table" >
                                        <colgroup>
                                            <col width="150" >
                                            <col width="150">
                                            <col width="260">
                                            <col width="150">
                                        </colgroup>
                                        <thead>
                                            <tr>
                                                <th>文件名</th>
                                                <th>大小</th>
                                                <th>上传进度</th>
                                                <th>操作</th>
                                            </tr>
                                        </thead>
                                        <tbody id="demoListxuexin"></tbody>
                                    </table>
                                </div>

@*                                <div>     
                                    
                                    
                                    <hr class="layui-border-green">
                                    <div>

                                        <table class="layui-hide" id="afilestable" lay-filter="afilestable"></table>

                                    </div>                      
                                        
                                    
                                    
                                 </div>*@
                         
                
                                 </form>








                             <form class="layui-form  layui-form-pane" id="gongzuotable" style="display:none">
                                <div class="layui-form-item" style="720px">
                                    <div class="layui-inline" style="200px">
                                        <label class="layui-form-label">开始时间</label>
                                        <div class="layui-input-inline" >
                                          <input type="text" name="starttime" id = "workstartyear"  placeholder="请自定义输入"  class="layui-input"  style="width:160px">
                                        </div>
                                    </div>
                                </div>


                                <div class="layui-form-item" style="720px">
                                    <div class="layui-inline" style="200px">
                                        <label class="layui-form-label">结束时间</label>
                                        <div class="layui-input-inline" >
                                          <input type="text" name="endtime" id = "workendyear"  placeholder="请自定义输入"  class="layui-input"  style="width:160px">
                                        </div>
                                    </div>
                                </div>






                                <div class="layui-form-item">
                                <label class="layui-form-label">工作单位</label>
                                <div class="layui-input-inline">
                                  <input type="text" name="workplace"  placeholder="" autocomplete="on" class="layui-input" id="workplace">
                                </div>
                                </div>

                                <div class="layui-form-item">
                                <label class="layui-form-label">岗位</label>
                                <div class="layui-input-inline">
                                  <input type="text" name="department"  placeholder="" autocomplete="on" class="layui-input" id="department">
                                </div>
                                </div>

                                 </form>
                             <form class="layui-form layui-form-pane" id="family" style="display:none">
                                <div class="layui-form-item">
                                <label class="layui-form-label">关系</label>
                                <div class="layui-input-inline">
                                  <input type="text" name="relation" id = "relation"  placeholder="亲人关系"  class="layui-input" >
                                </div>

                                </div>
                                <div class="layui-form-item">
                                <label class="layui-form-label">姓名</label>
                                <div class="layui-input-inline">
                                  <input type="text" name="name" id = "familyname"  placeholder=""  class="layui-input" >
                                </div>

                                </div>
                                <div class="layui-form-item">
                                <label class="layui-form-label">工作单位</label>
                                <div class="layui-input-inline">
                                  <input type="text" name="workplace"  placeholder="" autocomplete="on" class="layui-input" id="gzdw">
                                </div>
                                </div>

                                <div class="layui-form-item">
                                <label class="layui-form-label">出生年月</label>
                                <div class="layui-input-inline">
                                  <input type="text" name="birthday"  placeholder="请自定义输入" autocomplete="on" class="layui-input" id="birthday">
                                </div>
                                </div>


                                <div class="layui-form-item">
                                <label class="layui-form-label">现住址</label>
                                 <div class="layui-input-block">
                                  <input type="text" name="adresse"  placeholder="" autocomplete="on" class="layui-input" id="xzz">
                                </div>
                                </div>
                                <div class="layui-form-item">
                                <label class="layui-form-label">电话号码</label>
                                <div class="layui-input-inline">
                                  <input type="text" name="phone"  placeholder="" autocomplete="on" class="layui-input" id="dhhm">
                                </div>
                                </div>
 

                
                                 </form>
                             <form class="layui-form layui-form-pane " id="jiangchengform" style="display:none">


                                
                                <div class="layui-form-item jiangchengselect">
                                     <label class="layui-form-label" style="width:160px">请选择新增类型</label>
                                    <div class="layui-input-inline">
                                        <select name="type" lay-verify="required" lay-filter="jiangchengmodechose" id="xingshia">
                                            <option value="x">---请选择---</option>
                                            <option value="1">奖励</option>
                                            <option value="0">惩罚</option>

                                        </select>
                                    </div>                                   




                                    
                                 </div>


                                <div class="layui-form-item ">
                                <label class="layui-form-label">年份</label>
                                <div class="layui-input-inline">
                                  <input type="text" name="nianfen" id = "jiangliyear"  placeholder=""  class="layui-input" >
                                </div>

                                </div>
                                <div class="layui-form-item  ">
                                <label class="layui-form-label">情况说明</label>
                                 <div class="layui-input-block">
                                      <textarea placeholder="请填写具体奖惩情况" class="layui-textarea" name="recordsremark" id = "recordsremark"></textarea>
                                  </div>

                                </div>

                
                                 </form>


                <div class="layui-collapse" lay-accordion="">
                    <div class="layui-colla-item">
                        <h2 class="layui-colla-title">教育信息</h2>

                        <!--教育信息-->

                        <div class="layui-colla-content">

                            <div class="layui-tab-item layui-show">



                                <table class="layui-hide" id="education" lay-filter="education"></table>
                                <script type="text/html" id="barDemo">
                                    <div class="layui-btn-container">                     
                                        <button class="layui-btn layui-btn-sm" lay-event="addeducations">新增教育信息</button>
                                        @*<button class="layui-btn layui-btn-sm" lay-event="checkeducationsshit">查看《学信网查验结果截图》</button>*@
                                    </div>
              
                                </script>

                                <form class="layui-form layui-form-pane " id="jiaoyuform" style="display:none">
                                <table class="layui-table" id="educationfiles" lay-filter="educationfiles"></table>
                                </form>
                                <script>

                                    var kkkk = $("#jbxxid").val();

                                    layui.use('table', function () {
                                        var table = layui.table;
                                        var form = layui.form;
                                        //执行一个 table 实例
                                        table.render({
                                            elem: '#education'
                                            //, url: '/infos/GeteducationsInfosbyList?Jbxxid='+$("#jbxxid").val()
                                            ,url:gettheshiteducation()
                                            , method: "get"
                                            , contentType: 'json'
             
                                            ,even: true
                                            //, cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
                                            //, title: '用户表'
                                            , page: true //开启分页
                                            , toolbar: '#barDemo' //开启工具栏，此处显示默认图标，可以自定义模板，详见文档
                                            , cols: [[ 
                                                    {field:'starttime', width:80, title: '开始时间'}
                                                    ,{field:'endtime', width:80, title: '结束时间'}
                                                    ,{field:'school', width:120, title: '毕业学校', sort: true}
                                                    ,{field:'yuanxi', width:120, title: '专业', sort: true}
                                                    ,{field:'xuexixingshi', width:180, title: '学习形式'}
                                                    ,{field:'zhengshunumber', width:130, title: '证书编号'}
                                                    ,{field:'xuexinresult', width:140, title:'学信网查验结果'}
                                                    ,{field:'xuexinreason', width:80, title:'备注'}
                                                , { field: 'fileUrl', width: 80, title: '学信网查验报告', templet: proofPicturefileurl }
                                                ,{fixed: 'right', title:'操作', width: 125, minWidth: 125,toolbar: '#modifyAndDelete'}
                                                     //,{fixed: 'fileUrl', title:'操作', width: 125, minWidth: 125,toolbar: '#checkeducationsshit'}
                                                ]]
                                            , done:function(res){
                                                if(res.data[0].xuexinresult != "已查实"){
                                                    $("[data-field='fileUrl']").css('display', 'none');
                                                }else{
                                                    $("[data-field='xuexinreason']").css('display', 'none');

                                                }
                                            }
                                        });
                                        table.render({
                                            elem: '#jiangcheng'
                                            //, url: '/infos/GetejiangchengInfosbyList?Jbxxid='+$("#jbxxid").val()
                                          /*  , url: '/lib/layui/data.json' *///数据接口
                                            ,url:gettheshitjiangcheng()
                                            , method: "get"
                                            , contentType: 'json'
             

                                            , cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
                                            , title: '奖惩记录表'
                                            , page: true //开启分页
                                            , toolbar: '#jiangchengbar' //开启工具栏，此处显示默认图标，可以自定义模板，详见文档
                                            , cols: [[ 
                                                {
                                                    field: 'type', width: 80, title: '形式', minWidth: 80, 
                                                    templet: function(o) {
                                                        //console.log("giao");
                                                        //console.log(o);
                                                        if (o.type.replace(/\s*/g,"") == "1"){
                                                            return "奖励";
                                                        }else{
                                                            return "惩罚";
                                                        }
                                                 
                                                    },sort: true
                                                 }
                                                    ,{field:'nianfen', width:120, title: '获取时间',minWidth: 120}
                                  
                                                   ,{field:'recordsremark', width:140, title: '情况说明',minWidth: 140}
                                                    ,{fixed: 'right', title:'操作', width: 125, minWidth: 125, toolbar: '#modifyAndDelete'}

                                                ]]

                                        });


                                        table.render({
                                        elem: '#testo'
                                        //,url:'/infos/GetjibinginfosbyList'+'?Jbxxid='+ $("#jbxxid").val()
                                         ,url:gettheshit()
                                            //
                                        ,toolbar: '#toolbarDemotest'
                                        //,width: 600
                                        ,cols: [[




                                            ,{field:'time', width:120, title: '时间',minWidth: 120}
                                            ,{field:'diseasehistory', width:100, title: '疾病史', sort: true,minWidth: 100}
                                            ,{field:'diseasestatus', width:180, title: '治疗现状',minWidth: 180}
                                            ,{fixed: 'right', title:'操作', width: 125, minWidth: 125, toolbar: '#modifyAndDelete'}
                                        //   ,{field:'sign', title: '签名', minWidth: 100}
                                        //   ,{field:'experience', width:80, title: '积分', sort: true}
                                        //   ,{field:'score', width:80, title: '评分', sort: true}
                                        //   ,{field:'classify', width:80, title: '职业'}
                                        //   ,{field:'words', width:135, title: '字数', sort: true}
                                        ]]
                                        //,page: true
                                        });

                                        
                                      //触发单元格工具事件

                                        table.on('tool(jiangcheng)', function(obj) {
                                            var data = obj.data;
                                            console.log(data);
                                            if (obj.event === 'del_oldht') {
                                                layer.confirm('请问您真的想删除改条记录？',
                                                    //layer.confirm('请问您真的想删除这行数据？',
                                                    function(index) {


                                                        //console.log(data.hasOwnProperty('diseasehistory'));

                                                        //deletethefamilys(data.id);

                                                        deletetherecords(data.id);
                                                        table.reload('jiangcheng', {

                                                            where: {

                                                                "Jbxxid": $("#jbxxid").val()


                                                            }

                                                        });


                                                        layer.close(index);
                                                    });





                                            } else if (obj.event === 'edit_oldht') {
                                                //var dame = ;
                                                //console.log(dame == "1");
                                                //$("#xingshia").find("option[value='"+dame+"']").attr("selected",true);
                                                //$("#xingshia").val(data.type.replace(/\s*/g,""));
                                                $("#xingshia").val(data.type.replace(/\s*/g, ""));
                                                $("#jiangliyear").val(data.nianfen);
                                                $("#recordsremark").html(data.recordsremark);

                                                layui.form.render("select");

                                                data.type="";
                                                data.nianfen = "";
                                                data.recordsremark = "";
                                                dame = "";


                                                    layer.open({

                                                        type: 1
                                                        //具体配置参考：/docs/modules/layer.html#offset
                                                        , id: 'layserDemo'//防止重复弹出
                                                        , area: ["400px", "400px"]
                                                        , content: $("#jiangchengform"),

                                                        btn: '保存'
                                                        , btnAlign: 'c' //按钮居中
                                                        , shade: 0 //不显示遮罩
                                                        , yes: function() {

                                                            if  ($("select[name=jiangchengmode]").val() == 'x'){


                                                                layer.alert('请选择是奖励还是惩罚，不然完不成表格的提交');
                                                                return;
                                                                //layer.open({

                                                                //    type: 1,
                                                                //    content: "";



                                                                //});
                                                                //return;

                                                                //return 

                                                            }

                                                            uploadthejiangchengsinfo(data.id);
                                                            //console.log($('#keyi').val());

                                                            table.reload('jiangcheng',{


                                                                where:{



                                                                    "Jbxxid":$("#jbxxid").val()
                                                                }


                                                            });
                                                            $("#jiangchengform").hide();
                                                            layer.closeAll();
                                                        },
                                                        cancel: function(){



                                                            $("#jiangchengform").hide();


                                                        }
                                                        


                                                })
                                            }
                                        });





                                        table.on('tool(familytable)', function(obj) {
                                            var data = obj.data;
                                            console.log(data);
                                            if (obj.event === 'del_oldht') {
                                                layer.confirm('请问您真的想删除 和该员工关系为： ' + data.relation + '     。 姓名为： ' + data.name + ' 的这行数据？',
                                                    //layer.confirm('请问您真的想删除这行数据？',
                                                    function(index) {


                                                        //console.log(data.hasOwnProperty('diseasehistory'));

                                                        deletethefamilys(data.id);
                                                        table.reload('familytable', {

                                                            where: {

                                                                "Jbxxid": $("#jbxxid").val()


                                                            }

                                                        });


                                                        layer.close(index);
                                                    });





                                            } else if (obj.event === 'edit_oldht') {
                                                $("#relation").val(data.relation);
                                                $("#familyname").val(data.name);
                                                $("#gzdw").val(data.workplace);
                                                $("#birthday").val(data.birthday);
                                                $("#xzz").val(data.adresse);
                                                $("#dhhm").val(data.phone);
                                                data.relation = "";
                                                data.name="";
                                                data.workplace="";
                                                data.birthday="";
                                                data.adresse="";
                                                data.phone="";

                                                   layer.open({

                                                        type: 1
                                                        //具体配置参考：/docs/modules/layer.html#offset
                                                        , id: 'layserDemo'//防止重复弹出
                                                        , area: ["400px", "500px"]
                                                        , content: $("#family"),

                                                        btn: '保存'
                                                        , btnAlign: 'c' //按钮居中
                                                        , shade: 0 //不显示遮罩
                                                        , yes: function() {


                                                            uploadthefamilysinfos(data.id);
                                                            //console.log($('#keyi').val());
                                                            table.reload('familytable',{


                                                                where:{


                                                                    "Jbxxid":$("#jbxxid").val()

                                                                }

                                                            })


                                                            $("#family").hide();
                                                            layer.closeAll();
                                                        },
                                                        cancel: function(){



                                                            $("#family").hide();


                                                        }
                                                        


                                                })
                                            }
                                        });

                   
                                        table.on('tool(jobtable)', function(obj) {
                                            var data = obj.data;
                                            console.log(data);
                                            if (obj.event === 'del_oldht') {
                                                layer.confirm('请问您真的想删除 工作地点为： ' + data.workplace + '     。 工作部门为： ' + data.department + ' 的这行数据？',
                                                    //layer.confirm('请问您真的想删除这行数据？',
                                                    function(index) {


                                                        //console.log(data.hasOwnProperty('diseasehistory'));

                                                        deletetheworkinfos(data.id);
                                                        table.reload('jobtable', {

                                                            where: {

                                                                "Jbxxid": $("#jbxxid").val()


                                                            }

                                                        });


                                                        layer.close(index);
                                                    });





                                            } else if (obj.event === 'edit_oldht') {
                                                $("#workstartyear").val(data.starttime);
                                                $("#workendyear").val(data.endtime);
                                                $("#workplace").val(data.workplace);
                                                $("#department").val(data.department);
                                                

                                     

                                                data.starttime = "";
                                                data.endtime = "";
                                                data.workplace = "";
                                                data.department = "";

                                                layer.open({

                                                type: 1
                                                    //具体配置参考：/docs/modules/layer.html#offset
                                                ,id: 'layerwDemo'//防止重复弹出
                                                ,area:["600px","400px"]
                                                ,content: $("#gongzuotable"),
 
                                                    btn: '保存'
                                                ,btnAlign: 'c' //按钮居中
                                                ,shade: 0 //不显示遮罩
                                                ,yes: function(){
            
             
                                                    uploadtheworkinfos(data.id);
                                                    //console.log($('#keyi').val());
                                                    
                                                    $("#gongzuotable").hide();
                                                    table.reload('jobtable',{



                                                        where:{

                                                            "Jbxxid":$("#jbxxid").val()
                                                        }
                                                    });


                                                    layer.closeAll();
                                                },
                                                cancel:function(){




                                                    $("#gongzuotable").hide();
                                                }



                                                })     
                                            }
                                        });

                                        table.on('tool(education)', function(obj) {
                                            var data = obj.data;
                                            console.log(obj);
                                            if(obj.event === 'del_oldht'){
                                                layer.confirm('请问您真的想删除 这条学校为： '+data.school+ '     。 专业信息为： '+ data.yuanxi+ ' 的这行数据？',
 
                                                function(index){
             
                                                    //deletetheDisease(data.id);

                                                    deletetheEducation(data.id);
                                                    table.reload('education',{

                                                        where:{

                                                            "Jbxxid":$("#jbxxid").val()


                                                        }

                                                    });


                                                    layer.close(index);
                                                });





                                              } else if(obj.event === 'edit_oldht'){
                                                    $("#jiaoyustart").val(data.starttime);
                                                    $("#jiaoyuend").val(data.endtime);
                                                    $("#school").val(data.school);
                                                    $("#yaunxi").val(data.yuanxi);
                                                    $("#xuexixingshi").val(data.xuexixingshi);
                                                    $("#zhengshunumber").val(data.zhengshunumber);
                                                    $("#xuexinresult").val(data.xuexinresult);
                                                    $("#notpassresult").val(data.notpassresult);
                                                    if (data.xuexinresult == '未能查实'){

                                                        $("#xuexinupload").hide();
                                                        $("#uploadthexuexin").hide();
                                                        $("#xuexidiv").hide();

                                                    }
                                                    if (data.xuexinresult == '已查实'){

                                                        $("#xuexidiv").show();
                                                        $("#xuexidiv").show();
                                                    $("#xuexinupload").show();
                                                        $("#uploadthexuexin").show();

                                                    }


                                                    layui.form.render("select");
                                                    data.starttime = "";
                                                    data.endtime="";
                                                    data.school="";
                                                    data.yuanxi="";
                                                    data.xuexixingshi="";
                                                    data.zhengshunumber="";
                                                    data.xuexinresult = "";
                                                    data.notpassresult = "";




                                                    layer.open({

                                                        type: 1
                                                        //具体配置参考：/docs/modules/layer.html#offset
                                                        , id: 'layserDemo'//防止重复弹出
                                                        , area: ["700px", "65%"]
                                                        , content: $("#jiaoyutable"),

                                                        btn: '保存'
                                                        , btnAlign: 'c' //按钮居中
                                                        , shade: 0 //不显示遮罩
                                                        , yes: function() {

                                                            if (document.getElementById('fileUrl').value == "" || document.getElementById('fileUrl').value==null) {
                                                            document.getElementById('fileUrl').value = "无附件";

                        }

                                                            uploadtheeducationsinfo(data.id);


                                                            table.reload('education',{

                                                                where:{

                                                                    "Jbxxid":$("#jbxxid").val()


                                                                }

                                                            });
                                                            $("#jiaoyutable").hide();

                                                            layer.closeAll();
                                                        },
                                                        cancel:function(){

                                                            console.log("取消theshit");
                                                            $("#jiaoyutable").hide();

                                                        }
                                                        


                                                })
                                              }






                                        });
                                      table.on('tool(testo)', function(obj){ 

                                        var data = obj.data;
                                        console.log(obj);
                                        if(obj.event === 'del_oldht'){
                                            layer.confirm('请问您真的想删除 疾病为： '+data.diseasehistory+ '     。 生病时间为： '+ data.time+ ' 的这行数据？',
                                            //layer.confirm('请问您真的想删除这行数据？',
                                            function(index){
             

                                                //console.log(data.hasOwnProperty('diseasehistory'));

                                                deletetheDisease(data.id);
                                                table.reload('testo',{

                                                    where:{

                                                        "Jbxxid":$("#jbxxid").val()


                                                    }

                                                });


                                                layer.close(index);
                                            });





                                          } else if(obj.event === 'edit_oldht'){
                                                    $("#shijian").val(datta.time);
                                                    $("#diseasehistory").html(data.diseasehistory);
                                                    $("#diseasestatus").html(data.diseasestatus);
                                                    

                                                    data.time= "";
                                                    data.diseasehistory="";
                                                    data.diseasestatus = "";


                                                    layer.open({

                                                    type: 1
                                                     //具体配置参考：/docs/modules/layer.html#offset
                                                    ,id: 'layerDemo'//防止重复弹出
                                                    ,area:["500px","500px"]
                                                    ,content: $("#testtedalis"),
 
                                                     btn: '保存'
                                                    ,btnAlign: 'c' //按钮居中
                                                    ,shade: 0 //不显示遮罩
                                                    ,yes: function(){
            
             
                                                       uploadthekrankenstatus(data.id);
                                                       table.reload('testo',{

                                                           where:{

                                                               "Jbxxid":$("#jbxxid").val()


                                                           }

                                                       });
                  

                                                       $("#testtedalis").hide();
                                                       layer.closeAll();
                                                    },
                                                    cancel:function(){


                                                        $("#testtedalis").hide()




                                                    }



                                                    })
                                          }
                                      });












                                        table.on('toolbar(education)', function(obj) {
                                                var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
                                                switch(obj.event){
                                                  case 'getCheckData':
                                                    var data = checkStatus.data;  //获取选中行数据
                                                    layer.alert(JSON.stringify(data));
                                                  break;
                                                    case 'checkeducationsshit':

                                                        layer.open({
                                                          type: 1
                                                        //具体配置参考：/docs/modules/layer.html#offset
                                                        , id: 'layserDemo'//防止重复弹出
                                                        , area: ["600px", "600px"]
                                                        , content: $("#jiaoyuform"),

                                                        btn: '取消'
                                                        , btnAlign: 'c' //按钮居中
                                                        , shade: 0 //不显示遮罩 
                                                        
                                                        ,cancel: function(){



                                                            $("#jiaoyuform").hide();
                                                            $("#educationfiles").hide();

                                                        },yes:function(){



                                                            $("#jiaoyuform").hide();
                                                            $("#educationfiles").hide();

                                                            layer.closeAll();

                                                        }                                                       
                                                            
                                                            })
                                   
                                                        break
                                                case 'addeducations':
                                                    console.log("1615");
                                                    layer.open({

                                                        type: 1
                                                        //具体配置参考：/docs/modules/layer.html#offset
                                                        , id: 'layserDemo'//防止重复弹出
                                                        , area: ["600", "500"]
                                                        , content: $("#jiaoyutable"),

                                                        btn: '保存'
                                                        , btnAlign: 'c' //按钮居中
                                                        , shade: 0 //不显示遮罩
                                                        , yes: function() {


                                                            uploadtheeducationsinfo();


                                                            table.reload('education',{

                                                                where:{

                                                                    "Jbxxid":$("#jbxxid").val()


                                                                }

                                                            });


                                                            //table.reload('education');
                                                            //console.log($('#keyi').val());
                                                            $("#jiaoyutable").hide();

                                                            layer.closeAll();
                                                        },
                                                        cancel:function(){

                                                            console.log("取消theshit");
                                                            $("#jiaoyutable").hide();

                                                        }
                                                        


                                                })
                                     

                                                };                      

                                        });

                                        table.on('toolbar(testo)', function(obj){
                                                var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
                                                switch(obj.event){
                                                  case 'getCheckData':
                                                    var data = checkStatus.data;  //获取选中行数据
                                                    layer.alert(JSON.stringify(data));
                                                  break;

                                                  case 'addthekranks':
                                                    layer.open({

                                                    type: 1
                                                     //具体配置参考：/docs/modules/layer.html#offset
                                                    ,id: 'layerDemo'//防止重复弹出
                                                    ,area:["500px","500px"]
                                                    ,content: $("#testtedalis"),
 
                                                     btn: '保存'
                                                    ,btnAlign: 'c' //按钮居中
                                                    ,shade: 0 //不显示遮罩
                                                    ,yes: function(){
            
             
                                                       uploadthekrankenstatus();
                                                       table.reload('testo',{

                                                           where:{

                                                               "Jbxxid":$("#jbxxid").val()


                                                           }

                                                       });
                  

                                                       $("#testtedalis").hide();
                                                       layer.closeAll();
                                                    },
                                                    cancel:function(){


                                                        $("#testtedalis").hide()




                                                    }



                                                    })
                                                };
                                              });
                                        table.on('toolbar(jiangcheng)', function(obj) {
                                                var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
                                                switch(obj.event){
                                                  case 'getCheckData':
                                                    var data = checkStatus.data;  //获取选中行数据
                                                    layer.alert(JSON.stringify(data));
                                                  break;

                                                case 'addjiangchenginfos':
                                                    console.log("1615");
                                                    layer.open({

                                                        type: 1
                                                        //具体配置参考：/docs/modules/layer.html#offset
                                                        , id: 'layserDemo'//防止重复弹出
                                                        , area: ["400px", "400px"]
                                                        , content: $("#jiangchengform"),

                                                        btn: '保存'
                                                        , btnAlign: 'c' //按钮居中
                                                        , shade: 0 //不显示遮罩
                                                        , yes: function() {

                                                            if  ($("select[name=jiangchengmode]").val() == 'x'){


                                                                layer.alert('请选择是奖励还是惩罚，不然完不成表格的提交');
                                                                return;
                                                                //layer.open({

                                                                //    type: 1,
                                                                //    content: "";



                                                                //});
                                                                //return;

                                                                //return 

                                                            }

                                                            uploadthejiangchengsinfo();
                                                            //console.log($('#keyi').val());

                                                            table.reload('jiangcheng',{


                                                                where:{



                                                                    "Jbxxid":$("#jbxxid").val()
                                                                }


                                                            });
                                                            $("#jiangchengform").hide();
                                                            layer.closeAll();
                                                        },
                                                        cancel: function(){



                                                            $("#jiangchengform").hide();


                                                        }
                                                        


                                                })
                                                };                      

                                        });


                                    });
                                </script>


                            </div>

                        </div>
                    </div>
                </div>
                <div class="layui-collapse" lay-accordion="">
                    <div class="layui-colla-item">
                        <h2 class="layui-colla-title">工作经历</h2>
                        <div class="layui-colla-content">
                            <table class="layui-hide" id="jobtable" lay-filter="jobtable"></table>

                            <script type="text/html" id="workbar">
                                <div class="layui-btn-container">
                                  <button class="layui-btn layui-btn-sm" lay-event="addtheworkData">新增工作经历</button>
           @*                       <button class="layui-btn layui-btn-sm" lay-event="getCheckLength">选择</button>
                                  <button class="layui-btn layui-btn-sm" lay-event="isAll">验证是否全选</button>*@
                                </div>
                            </script>

                            <script type="text/html" id="barDemo">
                                <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
                                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
                            </script>
                            <script>
                                layui.use('table', function () {
                                    var table = layui.table;
                                    console.log("kk7kk");
                                    console.log($("#jbxxid").val());
                                    table.render({
                                        elem: '#jobtable',
                                        //url:'/infos/GetJobinfosbyList?Jbxxid='+$("#jbxxid").val()
                                        url:gettheshitjob()
                                        , toolbar: '#workbar' //开启头部工具栏，并为其绑定左侧模板
                                        , defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义，去除该参数即可
                                            title: '提示'
                                            , layEvent: 'LAYTABLE_TIPS'
                                            , icon: 'layui-icon-tips'
                                        }]




                                        , title: '用户数据表'
                                        , cols: [[
                                            { type: 'checkbox', fixed: 'left' }
                                            , { field: 'starttime', title: '开始时间', width: 130, fixed: 'left', unresize: true, sort: true }
                                            , { field: 'endtime', title: '结束时间', width: 110, fixed: 'left', unresize: true, sort: true }
                                            , { field: 'workplace', title: '工作单位', width: 110, edit: 'text' }
                                    
                                            , { field: 'department', title: '岗位', width: 80 }
                                            ,{  fixed: 'right', title:'操作', width: 125, minWidth: 125, toolbar: '#modifyAndDelete'}
                                 

                                        ]]
                                        , page: true
                                    });

           
                                    //头工具栏事件
                                    table.on('toolbar(jobtable)', function (obj) {
                                        var checkStatus = table.checkStatus(obj.config.id);
                                        switch (obj.event) {
                                            case 'getCheckData':
                                                var data = checkStatus.data;
                                                layer.alert(JSON.stringify(data));
                                                break;
                                            case 'addtheworkData':
                                                layer.open({

                                                type: 1
                                                    //具体配置参考：/docs/modules/layer.html#offset
                                                ,id: 'layerwDemo'//防止重复弹出
                                                ,area:["600px","400px"]
                                                ,content: $("#gongzuotable"),
 
                                                    btn: '保存'
                                                ,btnAlign: 'c' //按钮居中
                                                ,shade: 0 //不显示遮罩
                                                ,yes: function(){
            
             
                                                    uploadtheworkinfos();
                                                    //console.log($('#keyi').val());
                                                    
                                                    $("#gongzuotable").hide();
                                                    table.reload('jobtable',{



                                                        where:{

                                                            "Jbxxid":$("#jbxxid").val()
                                                        }
                                                    });


                                                    layer.closeAll();
                                                },
                                                cancel:function(){




                                                    $("#gongzuotable").hide();
                                                }



                                                })                                                
                                            case 'getCheckLength':
                                                var data = checkStatus.data;
                                                //layer.msg('选中了：' + data.length + ' 个');
                                                break;
                                            case 'isAll':
                                                layer.msg(checkStatus.isAll ? '全选' : '未全选');
                                                break;

                                            //自定义头工具栏右侧图标 - 提示
                                            case 'LAYTABLE_TIPS':
                                                layer.alert('这是工具栏右侧自定义的一个图标按钮');
                                                break;
                                        };
                                    });

                                    //监听行工具事件
                                    table.on('tool(test)', function (obj) {
                                        var data = obj.data;
                                        //console.log(obj)
                                        if (obj.event === 'del') {
                                            layer.confirm('真的删除行么', function (index) {
                                                obj.del();
                                                layer.close(index);
                                            });
                                        } else if (obj.event === 'edit') {
                                            layer.prompt({
                                                formType: 2
                                                , value: data.email
                                            }, function (value, index) {
                                                obj.update({
                                                    email: value
                                                });
                                                layer.close(index);
                                            });
                                        }
                                    });
                                });
                            </script>
                            <!--家庭情况-->
                        </div>
                    </div>
                </div>
                <div class="layui-collapse" lay-accordion="">
                    <div class="layui-colla-item">
                        <h2 class="layui-colla-title">家庭情况</h2>
                        <div class="layui-colla-content">

                            <!-- 家庭状况-->

                            <div style="margin-bottom: 5px;">
                            </div>

                            <script type="text/html" id="familybar">
                                <div class="layui-btn-container">
                                  <button class="layui-btn layui-btn-sm" lay-event="addtheFamilymembers">新增家庭成员</button>

                                </div>
                            </script>

                            <table class="layui-hide" id="familytable" lay-filter="familytable"></table> 

                            <script type="text/html" id="barDemo">
                                <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
                                <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
                                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
                            </script>



                            <!-- 注意：如果你直接复制所有代码到本地，上述 JS 路径需要改成你本地的 -->
                            <script>
                                layui.use('table', function () {
                                    var table = layui.table;

                                    var spcial = document.getElementById("jbxxid").value;
                                    console.log(spcial);
                                    table.render({  
                                        elem:'#familytable',
                                        //url:'/infos/GetfamilysinfosbyList?Jbxxid='+spcial
                                        url:gettheshitfamily()
                        
                                        ,cols: [[ //标题栏
                                            {type: 'checkbox', fixed: 'left'}
                                            ,{field:'id', width:80, sort: true, fixed: true ,hide:true}
                                            ,{field:'relation',title:'关系', width:80}
                                            ,{field: 'name', title: '姓名', minWidth: 60}
                                            ,{field: 'birthday', title: '出生年月', minWidth: 70}
                                            ,{field: 'workplace', title: '工作单位', minWidth: 80}
                                            ,{field: 'adresse', title: '现住址', width: 120}
                                            ,{field: 'phone', title: '紧急联系电话', width: 100}

                                            ,{fixed: 'right', title:'操作', width: 125, minWidth: 125, toolbar: '#modifyAndDelete'}
                                        ]]
                                    
                                       ,toolbar:'#familybar'
                                    
                                        ,even: true
                 
                                    
                                    
                                    })


                                        table.on('toolbar(familytable)', function(obj) {
                                                var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
                                            var data = obj.data;
                                                switch(obj.event){
                                                  case 'getCheckData':
                                                    var data = checkStatus.data;  //获取选中行数据
                                                    layer.alert(JSON.stringify(data));
                                                  break;                                                   
                                                  case 'addtheFamilymembers':
                                                    console.log("addthefamilysmemvber");
                                                    layer.open({

                                                        type: 1
                                                        //具体配置参考：/docs/modules/layer.html#offset
                                                        , id: 'layserDemo'//防止重复弹出
                                                        , area: ["400px", "500px"]
                                                        , content: $("#family"),

                                                        btn: '保存'
                                                        , btnAlign: 'c' //按钮居中
                                                        , shade: 0 //不显示遮罩
                                                        , yes: function() {


                                                            uploadthefamilysinfos();
                                                            //console.log($('#keyi').val());
                                                            table.reload('familytable',{


                                                                where:{


                                                                    "Jbxxid":$("#jbxxid").val()

                                                                }

                                                            })


                                                            $("#family").hide();
                                                            layer.closeAll();
                                                        },
                                                        cancel: function(){



                                                            $("#family").hide();


                                                        }
                                                        


                                                })
                                                };                      

                                        });

















                                    //监听表格复选框选择
                                    table.on('checkbox(demo)', function (obj) {
                                        console.log(obj)
                                    });
                                    //监听工具条
                                    table.on('tool(demotest)', function (obj) {
                                        var data = obj.data;
                                        if (obj.event === 'detail') {
                                            layer.msg('ID：' + data.id + ' 的查看操作');
                                        } else if (obj.event === 'del') {
                                            layer.confirm('真的删除行么', function (index) {
                                                obj.del();
                                                layer.close(index);
                                            });
                                        } else if (obj.event === 'edit') {
                                            layer.alert('编辑行：<br>' + JSON.stringify(data))
                                        }else if (obj.event === 'addtheFamilymembers'){





                                        }
                                    });

                                    var $ = layui.$, active = {
                                        addtheFamilymembers: function () { //获取选中数据

                               
                                            layer.open({

                                            type: 1
                                                //具体配置参考：/docs/modules/layer.html#offset
                                            ,id: 'layerwDemo'//防止重复弹出
                                            ,area:["400px","400px"]
                                            ,content: $("#family"),
 
                                                btn: '保存'
                                            ,btnAlign: 'c' //按钮居中
                                            ,shade: 0 //不显示遮罩
                                            ,yes: function(){
            
             
                                                uploadthefamilysinfos();
                                                //console.log($('#keyi').val());


                                                layer.closeAll();
                                            },
                                            cancel:function(){

                                                $("#family").hide();





                                            }



                                            }) 







                                            //var checkStatus = table.checkStatus('idTest')
                                            //    , data = checkStatus.data;
                                            //layer.alert(JSON.stringify(data));
                                        }
                                        , getCheckLength: function () { //获取选中数目
                                            var checkStatus = table.checkStatus('idTest')
                                                , data = checkStatus.data;
                                            //layer.msg('选中了：' + data.length + ' 个');
                                        }
                                        , isAll: function () { //验证是否全选
                                            var checkStatus = table.checkStatus('idTest');
                                            layer.msg(checkStatus.isAll ? '全选' : '未全选')
                                        }
                                    };

                                    $('.demoTable .layui-btn').on('click', function () {
                                        var type = $(this).data('type');
                                        active[type] ? active[type].call(this) : '';
                                    });
                                });
                            </script>
                        </div>
                    </div>
                </div>
                <div class="layui-collapse" lay-accordion="">
                    <div class="layui-colla-item">
                        <h2 class="layui-colla-title">奖惩记录</h2>
                        <div class="layui-colla-content">
                            <!--惩奖记录-->
                            <div class="layui-tab-item layui-show">
                      
                                
                                <table class="layui-hide" id="jiangcheng" lay-filter="jiangcheng"></table>
                                <script type="text/html" id="jiangchengbar">
                                    <div class="layui-btn-container">                     
                                        <button class="layui-btn layui-btn-sm" lay-event="addjiangchenginfos">新增奖惩记录</button>
                                    </div>
              
                                </script>





                            </div>
                        </div>
                    </div>
                </div>
            </div>
        <!--录用信息-->
        <div class="layui-tab-item">
            <table id="tablezlxx" lay-filter="tablezlxx" class="layui-hide"></table>
            <script type="text/html" id="toolbarZlxx">
                <div class="layui-btn-container">
                    <button class="layui-btn layui-btn-sm" lay-event="addZlxxData">添加录用信息</button>
                </div>              
            </script>
            <script lay-filter="yesorno" id="yesorno" style="text-align:center;"> <p  id="yesyes">是</p><p  id="nono">否</p></script>
            <script type="text/html" id="toolbarzlxx">
                <a class="layui-btn layui-btn-xs" lay-event="edit_zlxx">编辑</a>
                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del_zlxx">删除</a>
            </script>
            <form id="zlxxform" class="layui-form layui-form-pane" style="display:none;" method="post" lay-filter="zlxxform">

                            <!-- 来源、备注、时间 -->
                            <div class="layui-form-item">

                                <!-- 录用来源 -->
                                <div class="layui-inline layui-form-pane">
                                    <label class="layui-form-label">录用来源</label>
                                    <div class="layui-input-inline">
                                        <select name="Lyscrouce" lay-verify="required" lay-filter="zp">
                                            <option value="股东">股东</option>
                                            <option value="集团校园招聘">集团校园招聘</option>
                                            <option value="本单位校园招聘">本单位校园招聘</option>
                                            <option value="集团体系内其他单位校园招聘">集团体系内其他单位校园招聘</option>
                                            <option value="集团总部社会招聘">集团总部社会招聘</option>
                                            <option value="本单位社会招聘">本单位社会招聘</option>
                                            <option value="集团体系内其他单位社会招聘">集团体系内其他单位社会招聘</option>
                                            <option value="关系推荐">关系推荐</option>
                                            <option value="其他">其他</option>
                                        </select>
                                    </div>
                                </div>

                                <!-- 备注 -->
                                <div style="display:none" id="qita" class="layui-inline layui-form-pane">
                                    <label class="layui-form-label">推荐人：</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="Remark" lay-verify="required" value="非关系推荐"
                                               placeholder="请输入" autocomplete="off" class="layui-input">
                                    </div>
                                </div>

                                <!-- 录用时间 -->
                                <input name="Lytime" style="display:none;" value="2022-01-01" />                              
                            </div>
               <!-- 人资、部门 -->
                <div class="layui-form-item">
                    <!--人资-->
                        <div class="layui-inline" lay-verify="required">
                        <label class="layui-form-label">面试人员:</label>
                        <div class="layui-input-inline">
                            <div class="" style="width: 190px;">
                                <input name="Rz" placeholder="" lay-verify="required" class="layui-input" id="demo3">
                            </div>
                        </div>
                    </div>
                </div>
                <!--人才登记表-->
                <div class="layui-form-item">
                    <div class="layui-upload">
                        <br />
                        <button type="button" class="layui-btn layui-btn-normal" id="testrcdjbList">选择《人才登记表》</button>
                        <button type="button" class="layui-btn" id="testrcdjbListAction">开始上传</button>

                        <input name="Yrbm" id="rcdjb" hidden="hidden" value="无附件" />
                        <div class="layui-upload-list" style="max-width: 1000px;">
                            <table class="layui-table">
                                <colgroup>
                                    <col width="150">
                                    <col width="150">
                                </colgroup>
                                <thead>
                                    <tr>
                                        <th>文件名</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody id="demoListrcdjb"></tbody>
                            </table>
                        </div>
                    </div>                       
                </div>
                <!-- 面试评定表 -->
                <div class="layui-form-item">                                
                            <div class="layui-upload">
                                <br />
                                <button type="button" class="layui-btn layui-btn-normal" id="testmsbList">选择《面试评定表》</button>
                                <button type="button" class="layui-btn" id="testmsbListAction">开始上传</button>

                                <input name="Msb" id="msb" hidden="hidden" value="无附件" />
                                <div class="layui-upload-list" style="max-width: 1000px;">
                                    <table class="layui-table">
                                        <colgroup>
                                            <col width="150">
                                            <col width="150">
                                        </colgroup>
                                        <thead>
                                            <tr>
                                                <th>文件名</th>
                                                <th>操作</th>
                                            </tr>
                                        </thead>
                                        <tbody id="demoListmsb"></tbody>
                                    </table>
                                </div>
                            </div>
                            <hr class="layui-border-green">

                            <!--背景调查-->
                            <div class="layui-form-item">
                                <label class="layui-form-label" style="width:150px">是否进行背景调查</label>
                                <div class="layui-input-block" id="IsbjdcPurchased">
                                    <input type="radio" name="dc" value="是" title="是"  lay-filter="bjdc" class="yesbjdc">
                                    <input checked="true"type="radio" name="dc" value="否" title="否" lay-filter="bjdc" class="nobjdc">
                                </div>
                            </div>
                            <div class="layui-form-item layui-form-text" style="display:none;" id="yesbjdc">
                                <label class="layui-form-label">背景调查：</label>
                                <div class="layui-input-block">
                                    <textarea placeholder="请填写" class="layui-textarea" name="Bjdc" lay-verify="required" id="bjdc">
没有背景调查</textarea>
                                </div>
                            </div>
                </div>

                <div class="layui-form-item">
                    <!--评定结果-->
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">薪酬评定结果：</label>
                        <div class="layui-input-block">
                            <textarea placeholder="请填写" class="layui-textarea" name="Result" id="resultxc">
行政级别：
试用期薪酬：
转正薪酬：
                            </textarea>
                                        
                        </div>
                    </div>
                </div>
                <hr class="layui-border-green">

                <!--备注-->
                <div class="layui-form-item">
                    <div class="layui-upload">
                        <br />
                        <button type="button" class="layui-btn layui-btn-normal" id="testxcList">选择《薪酬评定表》</button>
                        <button type="button" class="layui-btn" id="testxcListAction">开始上传</button>

                        <input name="ResultBz" id="ResultBz" hidden="hidden" value="无附件" />
                        <div class="layui-upload-list" style="max-width: 1000px;">
                            <table class="layui-table">
                                <colgroup>
                                    <col width="150">
                                    <col width="150">
                                </colgroup>
                                <thead>
                                    <tr>
                                        <th>文件名</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody id="demoListxc"></tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </form>
        </div>
            <!--劳动关系-->
            <div class="layui-tab-item">
                <div class="layui-collapse" lay-accordion="">
                    <div class="layui-colla-item">
                        <h2 class="layui-colla-title">就职状态</h2>
                        <div class="layui-colla-content layui-show">

                            <div class="layui-tab-item layui-show">
                                <form lay-filter="ldgx" class="layui-form layui-form-pane" action="">
                                    <input type="hidden" name="id">
                                    <input type="hidden" name="jbxxid">
                                    <!--就职状态-->
                                    <div class="layui-inline">
                                        <label class="layui-form-label">就职状态:</label>
                                        <div class="layui-input-inline">
                                            <select name="JobStatus" lay-filter="JobStat" lay-verify="required" lay-search="">
                                                <option value="">下拉选择</option>
                                                <option value="在职">在职</option>
                                                <option value="离职">离职</option>
                                            </select>
                                        </div>
                                    </div>
                                    @*<hr class="layui-border-green">*@

                                    <!--离职时间-->
                                    <div class="layui-inline" id="leavetime" style="display:none">
                                        <label class="layui-form-label">离职时间:</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="LeaveDate" id="date" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                    <!--离职原因-->
                                    <div class="" id="leaveyy" style="display:none">
                                        <label class="layui-form-label">离职原因:</label>
                                        <div class="layui-input-inline">
                                            <input type="text" class="layui-input" name="leaveNote" placeholder="填写离职原因" style="width:800px">
                                        </div>
                                    </div>
                                    <!--工作交接-->
                                    <div class="layui-form-item" id="workjiaojie" style="display:none">
                                        <div class="layui-upload">
                                            <button type="button" class="layui-btn layui-btn-normal" id="UpWorkFiles">选择《工作交接表》</button>
                                            <button type="button" class="layui-btn" id="WorkFileUP">开始上传</button>
                                            <input name="WorkFiles" id="WorkFiles" hidden="hidden" value="" />
                                            <div class="layui-upload-list" style="max-width: 1000px">
                                                <table class="layui-table" id="tb_UpWorkFiles" lay-filter="tb_UpWorkFiles">
                                                    <colgroup>
                                                        <col>
                                                        <col width="150">
                                                        <col width="260">
                                                        <col width="150">
                                                    </colgroup>
                                                    <thead>
                                                        <tr>
                                                            <th>文件名</th>
                                                            <th>大小</th>
                                                            <th>上传进度</th>
                                                            <th>操作</th>
                                                        </tr>
                                                    </thead>
                                                    <tbody id="WorkFilesList"></tbody>
                                                </table>
                                                <script type="text/html" id="barlzfj">
                                                    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="lz_del">删除</a>
                                                </script>
                                            </div>
                                        </div>

                                    </div>
                                    <hr class="layui-border-green">
                                    <div class="layui-form-item btnsave">
                                        <div class="layui-btn-container">
                                            <button type="button" class="layui-btn" id="Save_ldgx">保存</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                    <div class="layui-colla-item">
                        <h2 class="layui-colla-title">劳动合同</h2>
                        <div class="layui-colla-content">
                            <div class="layui-tab-item layui-show">
                                <form lay-filter="ldht" class="layui-form layui-form-pane" action="">
                                    <input type="hidden" name="id">
                                    <input type="hidden" name="jbxxid">

                                    <fieldset class="layui-elem-field">
                                        <legend>当前状态</legend>
                                        <!--合同类型-->
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label" style="width:150px">合同类型:</label>
                                                <div class="" style="margin-left:150px;">
                                                    <select name="type" lay-verify="required" lay-search="" lay-filter="htype">
                                                        <option value="">下拉选择合同签订类型</option>
                                                        <option value="首次签订劳动合同">首次签订劳动合同</option>
                                                        <option value="二次签订劳动合同">二次签订劳动合同</option>
                                                        <option value="无固定期限劳动合同">无固定期限劳动合同</option>
                                                    </select>
                                                </div>
                                            </div>

                                            <!--合同期限-->
                                            <div class="layui-inline">
                                                <label class="layui-form-label" style="width:150px">合同期限（年）:</label>
                                                <div class="" style="margin-left:150px;">
                                                    @*<input type="text" name="year" class="layui-input">*@
                                                    <select name="year" lay-verify="required" lay-search="">
                                                        <option value="">下拉选择年限</option>
                                                        <option value="1年">1年</option>
                                                        <option value="2年">2年</option>
                                                        <option value="3年">3年</option>
                                                        <option value="4年">4年</option>
                                                        <option value="5年">5年</option>
                                                        <option value="6年">6年</option>
                                                        <option value="7年">7年</option>
                                                        <option value="8年">8年</option>
                                                        <option value="9年">9年</option>
                                                        <option value="10年">10年</option>
                                                        <option value="无固定期限">无固定期限</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">

                                            <!--起止时间-->
                                            <div class="layui-inline">
                                                <label class="layui-form-label" style="width:150px">开始时间:</label>
                                                <div class="" style="margin-left:150px;">
                                                    <input type="text" name="sdate" id="date" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
                                                </div>
                                            </div>
                                            <div class="layui-inline" id="e_date" style="display:none">
                                                <label class="layui-form-label" style="width:150px">结束时间:</label>
                                                <div class="" style="margin-left:150px;">
                                                    <input type="text" name="edate" id="date" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
                                                </div>
                                            </div>

                                        </div>
                                        <div class="layui-btn-container btnsave">
                                            <button type="button" class="layui-btn" id="Save_ldht">保存</button>
                                        </div>
                                    </fieldset>

                                    <fieldset class="layui-elem-field">
                                        <legend>历史状态</legend>
                                        <div class="layui-form-item">
                                            <table class="layui-hide" id="oldht" lay-filter="lyoldht"></table>
                                            <script type="text/html" id="toolbarOldht">
                                                <button type="button" id="ldhtAddRow" class="layui-btn" lay-event="add_oldht">添加</button>
                                            </script>
                                            <script type="text/html" id="barOldht">
                                                <a class="layui-btn layui-btn-xs" lay-event="edit_oldht">编辑</a>
                                                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del_oldht">删除</a>
                                            </script>
                                        </div>
                                    </fieldset>
                                </form>
                            </div>
                        </div>
                    </div>
                    <div class="layui-colla-item">
                        <h2 class="layui-colla-title">试用期管理</h2>
                        <div class="layui-colla-content">
                            <div class="layui-tab-item layui-show">
                                <form lay-filter="syq" class="layui-form layui-form-pane" action="">
                                    <input type="hidden" name="id">
                                    <input type="hidden" name="jbxxid">
                                    <!--试用期-->
                                    <div class="layui-inline">
                                        <label class="layui-form-label" style="width:150px">试用期：</label>
                                        <div class="layui-input-inline" style="width:120px">
                                            <select name="syq" lay-verify="required" lay-search="">
                                                <option value="">下拉选择</option>
                                                <option value="1个月">1个月</option>
                                                <option value="2个月">2个月</option>
                                                <option value="3个月">3个月</option>
                                                <option value="4个月">4个月</option>
                                                <option value="5个月">5个月</option>
                                                <option value="6个月">6个月</option>
                                            </select>
                                        </div>
                                    </div>

                                    <!--起止时间-->
                                    <div class="layui-inline">
                                        <label class="layui-form-label">起止时间:</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="sdate" id="date" lay-verify="date" placeholder="开始日期" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-inline" id="e_date">
                                        @*<label class="layui-form-label" style="width:150px">结束时间:</label>*@
                                        <div class="layui-input-inline">
                                            <input type="text" name="edate" id="date" lay-verify="date" placeholder="结束日期" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>

                                    <hr class="layui-border-green">
                                    <!--转正类型-->
                                    <div class="layui-inline">
                                        <label class="layui-form-label" style="width:150px">转正类型:</label>
                                        <div class="layui-input-inline" style="width:120px">
                                            <select name="zzlx" lay-filter="zztype" lay-verify="required" lay-search="">
                                                <option value="">下拉选择</option>
                                                <option value="正常转正">正常转正</option>
                                                <option value="提前转正">提前转正</option>
                                                <option value="延迟转正">延迟转正</option>
                                            </select>
                                        </div>
                                    </div>
                                    <!--原因说明-->
                                    <div class="layui-inline" id="zzyy" style="display:none">
                                        <label class="layui-form-label">原因说明：</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="zznote" class="layui-input" placeholder="转正原因说明" style="width:350px">
                                        </div>
                                    </div>
                                    <hr class="layui-border-green">
                                  

                                    <!--是否家访-->
                                    <div class="layui-inline">
                                        <label class="layui-form-label" style="width:150px">是否家访:</label>
                                        <div class="layui-input-inline" style="width:120px">
                                            <select name="isjf" lay-verify="required" lay-search="">
                                                <option value="">下拉选择</option>
                                                <option value="是">是</option>
                                                <option value="否">否</option>
                                            </select>
                                        </div>
                                    </div>

                                    <!--家访时间-->
                                    <div class="layui-inline">
                                        <label class="layui-form-label">家访时间:</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="jfdate" class="layui-input" placeholder="yyyy-MM-dd">
                                        </div>
                                    </div>

                                    <!--家访人-->
                                    <div class="layui-inline">
                                        <label class="layui-form-label" style="width:150px">家访人：</label>
                                        <div class="layui-input-inline" style="width:150px">
                                            <input type="tel" name="jfr" lay-verify="required|phone" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                    <!--是否有担保-->
                                    <div class="layui-inline">
                                        <label class="layui-form-label" style="width:150px">是否有担保物:</label>
                                        <div class="layui-input-inline" style="width:120px">
                                            <select name="isdb" lay-verify="required" lay-search="" lay-filter="sfdb" style="width:200px">
                                                <option value="">下拉选择</option>
                                                <option value="是">是</option>
                                                <option value="否">否</option>
                                            </select>
                                        </div>
                                    </div>
                                    <!--担保人-->
                                    <div class="layui-inline">
                                        <label class="layui-form-label">担保人：</label>
                                        <div class="layui-input-inline">
                                            <input type="tel" name="dbr" lay-verify="required|phone" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                    <!--与担保人关系-->
                                    <div class="layui-inline">
                                        <label class="layui-form-label" style="width:150px">与担保人关系：</label>
                                        <div class="layui-input-inline" style="width:150px">
                                            <input type="tel" name="dbrgx" lay-verify="required|phone" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                    <hr class="layui-border-green">
                                    <!--担保物-->
                                    <div class="layui-form-item" id="dbw" style="display:none">
                                        <div class="layui-upload">
                                            <button type="button" class="layui-btn layui-btn-normal" id="UPdbfiles">附件-家访资料</button>
                                            <button type="button" class="layui-btn" id="bt_dbfiles">开始上传</button>
                                            <p><a style="color:red">请上传《担保书》、《家访记录表》、《担保人身份证复印件》、《担保物复印件》。</a></p>
                                            <input name="dbfiles" id="dbfiles" hidden="hidden" value="" />
                                            <div class="layui-upload-list" style="max-width: 1000px;">
                                                <table class="layui-table" id="tb_syq" lay-filter="tb_syq">
                                                    <colgroup>
                                                        <col>
                                                        <col width="150">
                                                        <col width="260">
                                                        <col width="150">
                                                    </colgroup>
                                                    <thead>
                                                        <tr>
                                                            <th>文件名</th>
                                                            <th>大小</th>
                                                            <th>上传进度</th>
                                                            <th>操作</th>
                                                        </tr>
                                                    </thead>
                                                    <tbody id="dbfilesList"></tbody>
                                                </table>
                                                <script type="text/html" id="barsydbw">
                                                    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="syq_del">删除</a>
                                                </script>
                                            </div>

                                        </div>
                                    </div>
                                    <div class="layui-form-item btnsave">
                                        <button type="button" id="Save_syq" class="layui-btn">保存</button>
                                    </div>
                                </form>
                            </div>

                        </div>
                    </div>
                    <div class="layui-colla-item">
                        <h2 class="layui-colla-title">配置情况</h2>
                        <div class="layui-colla-content">
                            <div class="layui-tab-item layui-show">
                                <form lay-filter="pzxx" class="layui-form layui-form-pane" action="">
                                    <input type="hidden" name="id">
                                    <input type="hidden" name="jbxxid">

                                    <hr class="layui-border-green">

                                    <div class="layui-form-item">
                                        <table class="layui-hide" id="pzxx" lay-filter="lypzxx"></table>

                                        <script type="text/html" id="toolbarpzxx">
                                            <a class="layui-btn layui-btn-xs" lay-event="edit_pzxx">编辑</a>
                                            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del_pzxx">删除</a>
                                        </script>
                                    </div>

                                    <script type="text/html" id="barpzxx">
                                        <button type="button" id="pzxxAddRow" class="layui-btn" lay-event="add_pzxx">添加</button>
                                    </script>


                                </form>
                            </div>
                        </div>
                    </div>
                </div>
                 <script>
                        if (@Context.Session.GetString("rid") == 1||@Context.Session.GetString("rid")==4) {
                            $(".btnsave").hide();
                        }
                 </script>
            </div>
            <!--培训发展-->
            <div class="layui-tab-item">
                <div class="layui-collapse" lay-accordion="">
                    <div class="layui-colla-item">
                        <h2 class="layui-colla-title">内部培训</h2>
                        <div class="layui-colla-content layui-show">
                            <div class="layui-tab-item layui-show">
                                <form lay-filter="rzpx" class="layui-form layui-form-pane" action="">
                                    <input type="hidden" name="id">
                                    <input type="hidden" name="jbxxid">

                                    <fieldset class="layui-elem-field">
                                        <label class="layui-form-label" style="width:160px;font-weight:700">新员工入职培训</label>
                                        <hr class="layui-border-green">

                                        <!--入职引导人-->
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width:160px">入职引导人：</label>
                                            <div style="margin-left:160px;">
                                                <input name="rzpxr" placeholder="" lay-verify="required" class="layui-input" id="rzpxr" lay-filter="rzpxr">
                                            </div>
                                        </div>

                                        <!--培训计划-->
                                        <div class="layui-form-item">
                                            @*<label class="layui-form-label">培训计划</label>*@
                                            <div class="layui-upload">
                                                <button type="button" class="layui-btn layui-btn-normal" id="UPpxjh">选择培训计划附件</button>
                                                <button type="button" class="layui-btn" id="bt_UPpxjh">开始上传</button>
                                                <p><a style="color:red">请上传《新员工培训计划与评价表》、《7天观察期报告》</a></p>
                                                <input name="pxjh" id="pxjh" hidden="hidden" value="" />
                                                <div class="layui-upload-list" style="max-width: 1000px;">
                                                    <table class="layui-table" id="tb_rzpx" lay-filter="tb_rzpx">
                                                        <colgroup>
                                                            <col>
                                                            <col width="150">
                                                            <col width="260">
                                                            <col width="150">
                                                        </colgroup>
                                                        <thead>
                                                            <tr>
                                                                <th>文件名</th>
                                                                <th>大小</th>
                                                                <th>上传进度</th>
                                                                <th>操作</th>
                                                            </tr>
                                                        </thead>
                                                        <tbody id="pxjhList"></tbody>
                                                    </table>
                                                    <script type="text/html" id="barrzpx">
                                                        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="rzpx_del">删除</a>
                                                    </script>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item btnsave">
                                            <div class="layui-btn-container">
                                                <button type="button" class="layui-btn" id="Save_rzpx">保存</button>
                                            </div>
                                        </div>
                                    </fieldset>
                                </form>

                            </div>

                            <div class="layui-tab-item layui-show">
                                <form lay-filter="qtpx" class="layui-form layui-form-pane" action="">
                                    <input type="hidden" name="id">
                                    <input type="hidden" name="jbxxid">

                                    <fieldset class="layui-elem-field">
                                        <label class="layui-form-label" style="width:auto;font-weight:700">其他培训</label>
                                        <hr class="layui-border-green">
                                        <div class="layui-form-item">
                                            <table class="layui-hide" id="qtpx" lay-filter="lyqtpx"></table>
                                            <script type="text/html" id="toolbarqtpx">
                                                <a class="layui-btn layui-btn-xs" lay-event="edit_qtpx">编辑</a>
                                                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del_qtpx">删除</a>
                                            </script>
                                        </div>
                                        <script type="text/html" id="barqtpx">
                                            <button type="button" id="qtpxAddRow" class="layui-btn" lay-event="add_qtpx">添加</button>
                                        </script>
                                    </fieldset>
                                </form>
                            </div>



                        </div>
                    </div>
                    <div class="layui-colla-item">
                        <h2 class="layui-colla-title">外部培训</h2>
                        <div class="layui-colla-content">
                            <div class="layui-tab-item layui-show">
                                <form lay-filter="wbpx" class="layui-form layui-form-pane" action="">
                                    <input type="hidden" name="id">
                                    <input type="hidden" name="jbxxid">

                                    <div class="layui-form-item">
                                        <table class="layui-hide" id="wbpx" lay-filter="lywbpx"></table>

                                        <script type="text/html" id="toolbarwbpx">
                                            <a class="layui-btn layui-btn-xs" lay-event="edit_wbpx">编辑</a>
                                            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del_wbpx">删除</a>
                                        </script>
                                    </div>

                                    <script type="text/html" id="barwbpx">
                                        <button type="button" id="wbpxAddRow" class="layui-btn" lay-event="add_wbpx">添加</button>
                                    </script>
                                </form>
                            </div>

                        </div>
                    </div>
                    <div class="layui-colla-item">
                        <h2 class="layui-colla-title">职称、证书</h2>
                        <div class="layui-colla-content">
                            <div class="layui-tab-item layui-show">
                                <form lay-filter="zsxx" class="layui-form layui-form-pane" action="">
                                    <input type="hidden" name="id">
                                    <input type="hidden" name="jbxxid">

                                    <div class="layui-form-item">
                                        <table class="layui-hide" id="zsxx" lay-filter="lyzsxx"></table>

                                        <script type="text/html" id="toolbarzsxx">
                                            <a class="layui-btn layui-btn-xs" lay-event="edit_zsxx">编辑</a>
                                            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del_zsxx">删除</a>
                                        </script>
                                    </div>

                                    <script type="text/html" id="barzsxx">
                                        <button type="button" id="zsxxAddRow" class="layui-btn" lay-event="add_zsxx">添加</button>
                                    </script>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
                 <script>
                        if (@Context.Session.GetString("rid") == 1||@Context.Session.GetString("rid") == 4) {
                            $(".btnsave").hide();
                        }
                 </script>
            </div>
<!--人才评估-->
<div class="layui-tab-item">
    <blockquote class="layui-elem-quote">人才测评</blockquote>

    <table class="layui-hide" id="testRccp" lay-filter="testRccp"></table>
    
    <div class="layui-form-item"> 
        <script type="text/html" id="toolbarrccp">
            <a class="layui-btn layui-btn-xs" lay-event="edit_rccp">编辑</a>
            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del_rccp">删除</a>
        </script>
    </div>

    <script type="text/html" id="toolbarDemoRccp">
        <div class="layui-btn-container">                                 
        <button class="layui-btn layui-btn-sm" lay-event="addRccpData">添加人才测评信息</button>
        </div>
    </script>
    <br />
    <br />
    <br />
    <br />
        <blockquote class="layui-elem-quote">人才盘点</blockquote>

    <table class="layui-hide" id="testRcpd" lay-filter="testRcpd"></table>

    <div class="layui-form-item"> 
        <script type="text/html" id="toolbarrcpd">
            <a class="layui-btn layui-btn-xs" lay-event="edit_rcpd">编辑</a>
            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del_rcpd">删除</a>
        </script>
    </div>
    <script type="text/html" id="toolbarRcpd">
        <div class="layui-btn-container">                                 
        <button class="layui-btn layui-btn-sm" lay-event="addRcpdData">添加人才盘点信息</button>
        </div>
    </script>
    
    <!--人才测评-->
    <form id="rccp" style="display:none" class="layui-form layui-form-pane">
        <!--测评工具-->
        <div class="layui-inline">
            <label class="layui-form-label">测评工具:</label>
            <div class="layui-input-inline">
                <select name="CpTool" lay-verify="required" lay-search="">
                    <option value="北森测评">北森测评</option>
                    <option value="其他">其他</option>
                </select>
            </div>
        </div>
        
        <!--测评类型-->
        <div class="layui-inline">
            <label class="layui-form-label">测评类型:</label>
            <div class="layui-input-inline">
                <select name="CpType" lay-verify="required" lay-search="" id="cptype" lay-filter="cptype">
                    <option value="">请选择测评类型</option>
                    <option value="锐途测评">锐途测评</option>
                    <option value="高层领导力测评">高层领导力测评</option>
                    <option value="管理人员外部招聘测评-中层通用">管理人员外部招聘测评-中层通用</option>
                    <option value="管理人员外部招聘测评-销售">管理人员外部招聘测评-销售</option>
                    <option value="管理人员外部招聘测评-财务">管理人员外部招聘测评-财务</option>
                    <option value="管理人员外部招聘测评-人力资源">管理人员外部招聘测评-人力资源</option>
                    <option value="管理人员外部招聘测评-行政">管理人员外部招聘测评-行政</option>
                    <option value="管理人员评估选拔测评-中层通用">管理人员评估选拔测评-中层通用</option>
                    <option value="管理人员评估选拔测评-销售">管理人员评估选拔测评-销售</option>
                    <option value="管理人员评估选拔测评-财务">管理人员评估选拔测评-财务</option>
                    <option value="管理人员评估选拔测评-人力资源">管理人员评估选拔测评-人力资源</option>
                    <option value="管理人员评估选拔测评-行政">管理人员评估选拔测评-行政</option>
                    <option value="基层人员校园招聘-通用">基层人员校园招聘-通用</option>
                    <option value="基层人员校园招聘-财务">基层人员校园招聘-财务</option>
                    <option value="基层人员校园招聘-技术研发">基层人员校园招聘-技术研发</option>
                    <option value="基层人员校园招聘-客户服务">基层人员校园招聘-客户服务</option>
                    <option value="基层人员校园招聘-营销">基层人员校园招聘-营销</option>
                    <option value="基层人员校园招聘-职能支持类">基层人员校园招聘-职能支持类</option>
                    <option value="基层人员社会招聘-财务类">基层人员社会招聘-财务类</option>
                    <option value="基层人员社会招聘-客户服务类">基层人员社会招聘-客户服务类</option>
                    <option value="基层人员社会招聘-销售类">基层人员社会招聘-销售类</option>
                    <option value="基层人员社会招聘-人力资源类">基层人员社会招聘-人力资源类</option>
                    <option value="基层人员社会招聘-行政类">基层人员社会招聘-行政类</option>
                    <option value="基层人员社会招聘-技术支持类">基层人员社会招聘-技术支持类</option>
                    <option value="基层潜才测评-通用高潜">基层潜才测评-通用高潜</option>
                    <option value="360测评">360测评</option>
                </select>
            </div>
        </div>
        
        <!--测评时间-->
        <div class="layui-inline">
            <label class="layui-form-label">测评时间:</label>
            <div class="layui-input-inline">
                <input type="text" name="DateTime" id="date" lay-verify="date" placeholder="输入日期" autocomplete="off" class="layui-input cpdate">
            </div>
        </div>
        
        <!--测评结果-->
        <div id="v1"class="layui-form-item" style="display: none;">

        <div class="layui-inline">
        <label class="layui-form-label">锐途模板：</label>
                <div class="layui-input-block">
                    <textarea placeholder="请填写" style="width:485px;" class="layui-textarea"  lay-verify="required" id="value1">
因素总结：
1.能力因素：
2.适配因素：
3.动力因素：
核心特点因素：
1.潜在优势：
2.潜在风险：
                    </textarea>
                </div>
        </div></div>

        <div id="v2" class="layui-form-item" style="display: none;">
        <div class="layui-inline">
        <label class="layui-form-label">中层：</label>
                <div class="layui-input-block">
                    <textarea placeholder="请填写" style="width:485px;" class="layui-textarea"  lay-verify="required" id="value2">
1.优势素质:
2.有风险的素质:
3.基本描述:
                    </textarea>
                </div>
        </div></div>

        <div id="v4" class="layui-form-item" style="display: none;">
        <div class="layui-inline">
        <label class="layui-form-label">报告参考价值：</label>
        <div class="layui-input-inline">
            <select id="value4" lay-search="报告参考价值">
                <option value="高">高</option>
                <option value="低">低</option>
            </select>
        </div></div></div>

        <div id="v3" class="layui-form-item"  style="display: none;">
            <div class="layui-inline">
            <label class="layui-form-label">匹配度：</label>
            <div class="layui-input-inline">
            <input id="value3" class="layui-input" placeholder="请填写1%~100%"/>
        </div></div></div>

        <div id="v5" class="layui-inline" style="display: none;">
            <label class="layui-form-label">评分：</label>
            <div class="layui-input-inline">

            <select id="value5" lay-search="评分">
                <option value="一颗星">一颗星</option>
                <option value="二颗星">二颗星</option>
                <option value="三颗星">三颗星</option>
                <option value="四颗星">四颗星</option>
                <option value="五颗星">五颗星</option>
            </select>
            </div>
        </div>


        <div class="layui-form-item">

            <div class="layui-inline" style="display:none">
                <label class="layui-form-label">测评结果：</label>
                <div class="layui-input-block">
                    <textarea placeholder="请填写" style="width:485px;" class="layui-textarea" name="CpResult" lay-verify="required" id="allvalue" readonly></textarea>
                </div>
            </div>
        </div>

        <!--测评报告-->
        <div class="layui-upload">
            <button type="button" class="layui-btn layui-btn-normal" id="testcpList">上传测评附件</button>
            <button type="button" class="layui-btn" id="testcpListAction">开始上传</button>
            <input name="CpFile" id="CpFile" hidden="hidden" value="无附件" />
            <div class="layui-upload-list" style="max-width: 1000px;">
                <table class="layui-table">
                    <colgroup>
                        <col width="150">
                        <col width="150">
                    </colgroup>
                    <thead>
                        <tr>
                            <th>文件名</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody id="demoListcp"></tbody>
                </table>
            </div>           
        </div>
    </form>
    <!--人才盘点-->
    <form id="rcpd" style="display:none" class="layui-form layui-form-pane">
        <!--盘点时间-->
        <div class="layui-inline">
            <label class="layui-form-label">盘点时间:</label>
            <div style="margin-left:110px;">
                <input type="text" name="DateTime" id="date" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input pddate">
            </div>
        </div>
        <!--盘点项目-->
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">盘点项目：</label>
            <div class="layui-input-block">
                <textarea placeholder="请填写" class="layui-textarea" name="PdName" lay-verify="required" id="pdxm"></textarea>
            </div>
        </div>
        <!--盘点结果-->
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">盘点结果：</label>
            <div class="layui-input-block">
                <textarea placeholder="请填写" class="layui-textarea" name="PdResult" lay-verify="required" id="pdjg"></textarea>
            </div>
        </div>


    </form>                       
</div>
        </div>
    </div>

    <script>
        $("#withExport").click(function(){
	        layer.msg("点击事件");
        });

        layui.use('form', function () {
            var form = layui.form;
 
            form.on('radio(passornot)', function (data) {        
           
                if ($('#IsPurchased input[name="situation"]:checked ').val() == "合格") {
                    $("#notpassstatus").hide();
                    $("#hegeyesorno").show();
                    $("#uptjbg").show();

                }
                else {
                    $("#notpassstatus").show();
                    $("#hegeyesorno").hide();
                    $("#uptjbg").hide();

                }
                form.render();
            });
        });
        function selonchange() {
            console.log("cccc");
            sel1Index = this.selectedIndex - 1;// 设定数组省级下标从0开始
                //  console.log(sel1Index);
                sel2.options.length = 0;//点击省选项改变清空之前市级选项
                sel3.options.length = 0;
                if (sel1Index != -1) {
                    cityArr = citys[sel1Index].city
                    //console.log(cityArr);
                    //市级遍历
                    cityArr.forEach(v => {
                        var option = new Option(v.name);
                        sel2.options.add(option);//市
                    })
 
                    areaArr = cityArr[0].area;
                    sel3.options.length = 0; 
                    //区级遍历
                    areaArr.forEach(v => {
                        var option = new Option(v);
                        sel3.options.add(option);//区
                    })
 
                     address.innerText = citys[sel1Index].name + cityArr[0].name + areaArr[0];
                }
                else{
                    address.innerText = ""; 
                }


        }
        var los = [
            {
                title: 'menu item 5'
                , id: 5
                , child: [{
                    title: 'menu item 5-1'
                    , id: 55
                    , child: [{
                        title: 'menu item 5-1-1'
                        , id: 5555
                    }, {
                        title: 'menu item 5-1-2'
                        , id: 55555
                    }, {
                        title: 'menu item 5-1-3'
                        , id: 555555
                    }]
                }, {
                    title: 'menu item 5-2'
                    , id: 52
                }, {
                    title: 'menu item 5-3'
                    , id: 53
                }]
            }]

        console.log(los);

        function gettheUserldatas() {

            var lis = [];

            $.ajax({
                url: "/User/GetUserData",
                type: "post",
                async: false,
                success: function (datas) {

                    lis = datas;
                    console.log(lis);
                    
                }
            })

            return lis;

        }

        function gettheOriginaldatas() {



            var lis = [];

            $.ajax({
                url: "/TreeData/GetOrgTreeDatanew",
                type: "post",
                async: false,
                success: function (datas) {



                    lis = datas;
                    console.log(lis);


                }
            })

            return lis;

        }

        function gettheSheng(){


            

            var lis = [];


            $.ajax({
                url: "/TreeData/getthesheng",
                type: "post",
                async: false,
                success: function (datas) {



                    lis = datas;



                }
            })
            console.log(lis);
            return lis;




        }


        function gettheShithree(f_id){



            var lis = [];

            $.ajax({
                url: "/TreeData/gettheshithree?f_id="+f_id ,
                type: "post",
                async: false,
                success: function (datas) {



                    lis = datas;



                }
            })
            console.log(lis);


            return lis;



        }
        function gettheShi(f_id){


            var lis = [];

            $.ajax({
                url: "/TreeData/gettheshi?f_id="+f_id ,
                type: "post",
                async: false,
                success: function (datas) {



                    lis = datas;



                }
            })
            console.log(lis);


            return lis;


        }

        function getthexian(f_id){

            var lis = [];

            $.ajax({
                url: "/TreeData/getthexian?f_id="+f_id ,
                type: "post",
                async: false,
                success: function (datas) {



                    lis = datas;



                }
            }) 
            console.log(lis);
            return lis;

        }


        layui.use(['dropdown', 'util', 'layer'], function () {
            var element = layui.element;
            var layer = layui.layer;
            var dropdown = layui.dropdown
                , util = layui.util
                , layer = layui.layer
                , table = layui.table
                , $ = layui.jquery;



            dropdown.render({
                elem: '#demo100',
                //data:los,
                data: gettheOriginaldatas(),

                click: function (item) {
                    //layer.msg(util.escape(JSON.stringify(item)));
                    this.elem.val(item.title);
                }
            });

            dropdown.render({
                elem: '#demo200',
                //data:los,
                data: GetDingDept(),

                click: function (item) {
                    //layer.msg(util.escape(JSON.stringify(item)));
                    this.elem.val(item.title);
                }
            });
            //dropdown.render({
            //    elem: '#gettheSheng',
            //    //data:los,
            //    data: gettheSheng(),

            //    click: function (item) {
            //        //layer.msg(util.escape(JSON.stringify(item)));
            //        this.elem.val(item.title);
            //    }
            //});
            
            //监听折叠
            element.on('collapse(test)', function (data) {
                layer.msg('展开状态：' + data.show);
            });
        });
    </script>


    <script>

        layui.use(['element', 'form', 'layedit', 'laydate'], function () {
            var $ = layui.jquery
                , element = layui.element //Tab的切换功能，切换事件监听等，需要依赖element模块
                , form = layui.form
                , layer = layui.layer
                , layedit = layui.layedit
                , laydate = layui.laydate;

            //日期
            laydate.render({
                elem: '#date'
            });
            laydate.render({
                elem: '#dateOfJointhePartydate',
                type: 'year'
            });

            laydate.render({
                elem: '#birthdate',
                done: function(value, date) {

                    console.log("sahengri");
                    let chosetime = value.substr(0, 10);
                    let chose = new Date(chosetime);
                    let nowtime = new Date(new Date());
                    var day = nowtime.getTime() - chose.getTime();
                    var key = parseInt(day / (1000 * 60 * 60 * 24));
                    //$(’#_orgId’).val(data._orgId);
                    if (key < 0) {
                        layer.alert('你日期选错了老铁，今天是' + value + '你选择的日期，都大于今天了！！');
                    }

                    else {

                        console.log(Math.floor(key / 365));
                        $('#age').val(Math.floor(key / 365));
                    }
                }

            });
            laydate.render({
                elem: '#workstart'
            });

            laydate.render({
                elem: '#workend'
            });
            laydate.render({
                elem: '#chengfayear'
            });

            laydate.render({

                elem: '#workstartmonth',
                type: 'month',
                format:'MM'


            });

            laydate.render({

                elem: '#workendmonth',
                type: 'month',
                format:'MM'

            });


            //form.val('addthevalues', {
            //    "hyzk": /*@ViewBag.hyzk;*/
      
            //    });
                    
            form.on('select(xjchosethesheng)',function(data){


                $("#xjshi").empty();

                $("#xjxian").empty();
                var xjshioption = "";
                var xjxianoption = "";

                var f_id = data.value;

                var xjshilis = gettheShithree(f_id);   


                for(var i = 0; i <
	                xjshilis.length; i++) {


	                xjshioption += '<option value="' + xjshilis[i]["f_Id"] + '">' + xjshilis[i]["f_FullName"] + '</option>';
                }

   
                $(xjshioption).appendTo("#xjshi");
                

                var keyid = $("#xjshi").val();


                var xjxianlist = gettheShithree(keyid);




                for(var i = 0; i <
	                xjxianlist.length; i++) {


	                xjxianoption += '<option value="' + xjxianlist[i]["f_Id"] + '">' + xjxianlist[i]["f_FullName"] + '</option>';
                }

                $(xjxianoption).appendTo("#xjxian");



                form.render();



            })



            form.on('select(hjchosethesheng)',function(data) {


                $("#hjshi").empty();
                $("#hjxian").empty();
                var hjshioption = "";
                var hjxianoption = "";
                var f_id = data.value;
                var hjshilis = gettheShithree(f_id);   


                for(var i = 0; i <
	                hjshilis.length; i++) {


	                hjshioption += '<option value="' + hjshilis[i]["f_Id"] + '">' + hjshilis[i]["f_FullName"] + '</option>';
                }

   
                $(hjshioption).appendTo("#hjshi");
      


                var keyid = $("#hjshi").val();
                

                var hjxianlist = gettheShithree(keyid);  

                for(var i = 0; i <
	                hjxianlist.length; i++) {


	               hjxianoption += '<option value="' + hjxianlist[i]["f_Id"] + '">' + hjxianlist[i]["f_FullName"] + '</option>';
                }





                $(hjxianoption).appendTo("#hjxian");
                form.render();




            })
            form.on('select(chosethesheng)', function(data) {

                $("#shi").empty();
                $("#xian").empty();
                var shioption = "";

                var f_id = data.value;
                console.log(f_id);
                var shilis = gettheShi(f_id);   


                for(var i = 0; i <
	                shilis.length; i++) {


	                shioption += '<option value="' + shilis[i]["f_Id"] + '">' + shilis[i]["f_FullName"] + '</option>';
                }
                $(shioption).appendTo("#shi");
      
                //$(xianoption).appendTo("#xian");  
                form.render();

                              

            });
            form.on('select(chosethexian)', function(data) {




                $("#xian").empty();
                var xianoption = "";
                var xian_id = data.value;
                var xianlis = getthexian(xian_id);
                console.log(xianlis);

                for(var i = 0; i <
	                xianlis.length; i++) {


	                xianoption += '<option value="' + xianlis[i]["f_Id"] + '">' + xianlis[i]["f_FullName"] + '</option>';
                }

                $(xianoption).appendTo("#xian");  
                form.render();

            });
   
            laydate.render({
                elem: '#datestartwork'
                ,done: function(value, date){

                     let chosetime = value.substr(0,10);
                     let chose = new Date(chosetime);
                     let nowtime = new Date(new Date());
                     var day = nowtime.getTime() - chose.getTime();
                     var key = parseInt(day/(1000*60*60*24));
                     //$(’#_orgId’).val(data._orgId);
                     if (key < 0)  {
                         layer.alert('你日期选错了老铁，今天是'+ value +'你选择的日期，都大于今天了！！');
                     }
                     
                     else {

                         console.log(Math.floor(key / 365));


                         $('#workage').val(Math.floor(key / 365));
                         
                         //layer.alert(Math.floor(key / 365));
                          

                     }
                    //layer.alert('你选择的日期是：' + value + '<br>获得的对象是' + JSON.stringify(date));
                }
            });
            laydate.render({
                elem: '#date1'
            });

            //触发事件
            var active = {
                tabAdd: function () {
                    //新增一个Tab项
                    element.tabAdd('demo', {
                        title: '新选项' + (Math.random() * 1000 | 0) //用于演示
                        , content: '内容' + (Math.random() * 1000 | 0)
                        , id: new Date().getTime() //实际使用一般是规定好的id，这里以时间戳模拟下
                    })
                }
                , tabDelete: function (othis) {
                    //删除指定Tab项
                    element.tabDelete('demo', '44'); //删除：“商品管理”


                    othis.addClass('layui-btn-disabled');
                }
                , tabChange: function () {
                    //切换到指定Tab项
                    element.tabChange('demo', '22'); //切换到：用户管理
                }
            };

            $('.site-demo-active').on('click', function () {
                var othis = $(this), type = othis.data('type');
                active[type] ? active[type].call(this, othis) : '';
            });

            //Hash地址的定位
            var layid = location.hash.replace(/^#test=/, '');
            element.tabChange('test', layid);

            element.on('tab(test)', function (elem) {
                location.hash = 'test=' + $(this).attr('lay-id');
            });

        });
    </script>


    
</body>
</html>